Created
June 14, 2012 05:38
-
-
Save claudinec/2928177 to your computer and use it in GitHub Desktop.
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
# From http://www.thingy-ma-jig.co.uk/blog/10-10-2006/mysql-drop-all-tables | |
mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll want to also use "--triggers --quick --routines --master-data=2" on the backup, that grabs stored procedures and triggers, which otherwise don't get backed up. The master-data one grabs the binary log position for replication (if you use that). :-)