pitfall: mysqldump vs .my.cnf

It took me quite some time to recognise, that the existence of ~/.my.cnf resp. specifying databases in there disturbs the operation of mysqldump.

If you pass a database name on the command line (with or without the command line option “–databases”) and there is a database listed in ~/.my.cnf, this is the kind of error message, you will get shown:

Warning: mysqldump: ignoring option ‘–databases’ due to invalid value ‘…’


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.