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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With