Created
November 13, 2013 17:55
-
-
Save iamajeesh/7453396 to your computer and use it in GitHub Desktop.
SQL BACKUP of all DB on the SERVER/VPS to seperate files;
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
#when mysql command opens the sql console | |
mysql -e 'show databases' | while read dbname; do mysqldump --complete-insert "$dbname" > "$dbname".sql; done | |
#when mysql showes access denied error use -uROOT and -pPASSWORD | |
mysql -uROOT -pPASSWORD -e 'show databases' | while read dbname; do mysqldump -uROOT -pPASSWORD --complete-insert "$dbname" > "$dbname".sql; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment