Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shell Script to dump all MAMP DBs into separate files
# based on
# 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
You can’t perform that action at this time.