Created
November 30, 2022 15:13
-
-
Save jordantrizz/79fd6c4de9bcb5fd35a3880418eb1199 to your computer and use it in GitHub Desktop.
Backup all MySQL Databases on a Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql -uroot -N -e 'show databases' | while read dbname; do mysqldump -uroot --complete-insert "$dbname" > "$dbname".sql; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment