I need to dump all databases one by one. This command: mysqldump --all-databases makes me a single large file that is apparently all the databases in one file. But I want to dump and save each database in separate file. I have surfed the net but haven't really found any good solution. Any ideas? Thanks.
yes, but than I have to manually put every database name in. I have like 50 databases. Is there a command I can list the names and than pipe them to mysqldump? rep given bdw
Hi jasonsc, If you are able to get a command line session then the following code will dump each of your databases into a separate dump file: for database in `mysql -e 'show databases' | grep -v 'Database' `; do echo "Dumping $database"; mysqldump $database > dump_$database.sql; done HTH