Last active
July 19, 2017 06:08
-
-
Save syammohanmp/625248747180fac80fca to your computer and use it in GitHub Desktop.
mysql Commands
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
/*Backup all Databases*/ | |
mysqldump -u <username> -p --all-databases > /home/tmp/backup/dbs.sql | |
/*Backup Single Database*/ | |
mysqldump -u <username> -p db_name > /home/tmp/backup/db_name.sql | |
/*Backup Single Database - Compressed */ | |
mysqldump -u <username> -p db_name --quick | gzip > /home/tmp/backup/db_name.sql.gz | |
/*Import gzipped database*/ | |
gunzip < file.sql.gz | mysql -u <username> -p <dbname> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment