Skip to content

Instantly share code, notes, and snippets.

@esaborit4code
Last active August 29, 2015 14:11
Show Gist options
  • Save esaborit4code/b889b2cabc70d989d5c4 to your computer and use it in GitHub Desktop.
Save esaborit4code/b889b2cabc70d989d5c4 to your computer and use it in GitHub Desktop.
DB server change on the fly
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
@esaborit4code
Copy link
Author

These commands have to be run on the destination server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment