Reputation: 1058
I am getting the following error:
mysqldump: [ERROR] unknown variable 'database=myDB1'
when I run this command:
mysqldump -u root -p myDB2 > someFile
There is a db by the name myDB1 and of course, a db by the name myDB2.
This worked before (or so I think). I do not recollect changing my.cnf or any other configuration file.
Upvotes: 19
Views: 14277
Reputation: 605
Your problem is likely related with ~/.my.cnf. You've probably set database option in ~/.my.cnf file like database=somedatabase in [client] group instead of in [mysql] group.
Upvotes: 48