Ubuntu – thesqldump: unknown option ‘–:q’

MySQLUbuntu

mysqldump worked fine just yesterday.
Today I tried to dump a database and got this error message

mysqldump: unknown option '–:q'

Nothing helps, I checked all the parameters, runned "mysqldump -h", "mysqldump" without options – always the same result.

I suppose the executable is corrupted in some way or .. I really don't know.
I think maybe I should try to reinstall the mysqldump but I`m not sure how to do it without breaking the currently working mysql server to stop.

Console mysql client is working fine.
MySql version is 5.1.54-1. The server is Ubuntu 11.04

Best Answer

My guess would be someone was editing the file with vi, tried to quit (:q) while in writing mode, didn't notice and then saved the file. If this is the case edit the file and remove the extra ":q" characters.

Edit: Is there an alias for mysqldump or another script with the same name in the current path (which mysqldump)?