A question that came up during the MySQL track at the UKOUG
conference in Birmingham was "Can I exclude only a few databases
from mysqldump? Let's say that I have 50 databases, and I want to
dump all of them, except a few."
As many know, mysqldump has an option to ignore specific tables. SO if you have 1,000 tables in a databases, you can tell mysqldump to dump all the tables except a few ones.
There is no corresponding option to exclude one or more databases.
However, if you know your command line tools, the solution is easy:
First, we get the list of all databases:
mysql -B -N -e 'show databases' …[Read more...]