Created
October 31, 2010 03:29
-
-
Save alexzhan/656077 to your computer and use it in GitHub Desktop.
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
#Dump ALL MySQL Databases | |
mysqldump --user=XXXXXXXX --password=XXXXXXX -A > /PATH/TO/DUMPFILE.SQL | |
#Dump Individual or Multiple MySQL Databases | |
mysqldump --user=XXXXXXXX --password=XXXXXXX --databases DB_NAME1 DB_NAME2 DB_NAME3 > /PATH/TO/DUMPFILE.SQL | |
#Dump only certain tables from a MySQL Database | |
mysqldump --user=XXXXXXXX --password=XXXXXXXX --databases DB_NAME --tables TABLE_NAME > /PATH/TO/DUMPFILE.SQL | |
# | |
I'm using MySQL 4.1.8 on my development server, but am behind a few releases on our production server. In order to make dumps compatible with the old MySQL version, add the following switch: | |
--compatible=mysql323c | |
# | |
# | |
Use the following procedure to reload the contents of a database: | |
Unzip the backup file you wish to use. | |
Open it up and pull out only the information that you will need. | |
Save this text file. | |
Use the following command to feed back in the contents of a text file: | |
# | |
mysql --verbose --user=root --password=mysql 'ItemsInfo' < /data/ItemsInfo.sql | |
http://www.patrickpatoray.com/index.php?Page=30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment