Dumping MySQL Tables into Separate Files

This bit of shell wizardry is particularly handy if you have to upload to a phpmyadmin installation with a limited file size:

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

Source – http://stackoverflow.com/questions/9359053/mysqldumper-dumping-each-table-separately

Author: Joel Sutton

Me