Troubleshooting from the comments above:
That is correct syntax. I'd guess that mysqldump is picking up some other options somewhere. Maybe it's a shell alias with an option like -A included in the alias definition? Try running
\mysqldump ...
to run it un-aliased.
Your reply:
@BillKarwin you were on the right track with -A. I tried mysqldump --print-defaults and apparently --all-databases is in the default arguments. I ran it with --no-defaults and it worked like a charm.
The problem is that --all-databases
was configured as a default option. When you try using that option together with an argument specifying one database, it outputs the usage error you described.
http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html says that all-databases
can be either a command-line flag, or an option in the config file.
I'd suggest looking in your /etc/my.cnf or $HOME/.my.cnf for the all-databases
option. It can appear either in the [mysqldump]
group or the [client]
group.