See http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html

mysql> SET FOREIGN_KEY_CHECKS = 0;
mysql> SOURCE dump_file_name;
mysql> SET FOREIGN_KEY_CHECKS = 1;

Bob

-----Original Message-----
From: Robert A. Rosenberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 01, 2004 5:56 PM
To: [EMAIL PROTECTED]
Subject: Reloading Database with Foreign Keys


I just tried to reload a mysqldump created dump to a new server and 
got rejected due to lack of referential integrity. I remember the 
existence of a command I can insert in the file that will turn off 
the checking of the Foreign Keys while the recreation is being done 
but I can not locate it in the Docs.

Can someone help me by supplying me with the correct command (which I 
remember as setting some switch to False/Off at the start of the 
recreation and resetting it to True/On [or vice-versa] at the end of 
the recreation)?

Thanks.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to