Skip to content

Instantly share code, notes, and snippets.

@ferry77
Created April 13, 2015 12:41
Show Gist options
  • Save ferry77/80b34c208ec4865c6b66 to your computer and use it in GitHub Desktop.
Save ferry77/80b34c208ec4865c6b66 to your computer and use it in GitHub Desktop.
Mysqldump all database to individual file
mysql -u[uname] -p[password] -e "show databases" | grep -Ev 'Database|information_schema' | while read dbname; do mysqldump -u[uname] -p[password] $dbname > ~/db_backup/$dbname.sql; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment