Oneliner to dump & gzip all MySQL DBs, each in a separate file
From the backup folder run:
mysql -s -r -N -u root -p -e 'show databases where `Database` not in("information_schema","performance_schema")' | while read db; do mysqldump -u root -p $db | gzip > ./${db}.sql.gz; done
Written by Ivan Dilber
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#