MAMP – backup all databases to separate files
# 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
Tags: MAMP, OSX
This entry was posted on Středa, Duben 5th, 2017 at 09:05
You can follow any responses to this entry through the RSS 2.0 feed.