Last active
August 29, 2015 14:11
-
-
Save esaborit4code/b889b2cabc70d989d5c4 to your computer and use it in GitHub Desktop.
DB server change on the fly
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
mysqldump -h origin.server.com -u the_origin_user -p the_origin_database --ignore-table=the_origin_database.that_huge_table | tee dump.sql | mysql the_database -u the_user --password=ThePassword | |
mysqldump -h origin.server.com -u the_origin_user -p the_origin_database that_huge_table --no-data | mysql the_database -u the_user --password=ThePassword | |
mysqldump -h origin.server.com -u the_origin_user -p the_origin_database that_huge_table | mysql the_database -u the_user --password=ThePassword |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These commands have to be run on the destination server.