Created
September 9, 2012 11:08
-
-
Save Svel/3683829 to your computer and use it in GitHub Desktop.
Commands to recover MySQL dump for InnoDB with FK
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
| ---# mysqldump -uUser -hHost -p database > database.sql | |
| ---# mysql -D database -uUser -p --init-command="set @@foreign_key_checks=0" < database.sql | |
| SET FOREIGN_KEY_CHECKS=0 ; | |
| use database ; | |
| source database.sql ; | |
| SET FOREIGN_KEY_CHECKS=1 ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment