Mysqldumper: Dumping each table separately Mysqldumper: Dumping each table separately git git

Mysqldumper: Dumping each table separately


This should work in a shell:

for x in `mysql --skip-column-names -u [username] -p[password] [dbname] -e 'show tables;'`; do     mysqldump -u [username] -p[password] [db name] $x > "$x.sql"done


mysqldump -t -u [username] -p test mytable

will dump the table 'mytable' from the database 'test'.

If you want to automate the procedure, you will need to write a script, that selects the table_names from the schema for you and apply the operation abovefor each table. You can automate the git operations as well.