-
-
Save roeeyossef/1fd164ada20feff60cd73314673c1800 to your computer and use it in GitHub Desktop.
Shell Script to dump all MAMP DBs into separate files
This file contains 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
# based on http://www.commandlinefu.com/commands/view/2916/backup-all-mysql-databases-to-individual-files | |
# but modified for the MAMP path and to include default root/root as username and password | |
for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment