Ignore Innodb table foreign key constraints check.

How to Ignore Innodb table  foreign key constraints check. The following steps will show you to how to do that task.

# mysql -uroot -ppassword -h 192.168.1.a

  1. Load data from dump file.
mysql> SET FOREIGN_KEY_CHECKS=0;
mysql> SOURCE /root/databasedump.sql; 
mysql> SET FOREIGN_KEY_CHECKS=1;

2. Load data from delimited text file.
mysql> SET FOREIGN_KEY_CHECKS = 0;
mysql> LOAD DATA INFILE '/path/to/mytable.txt' INTO TABLE mytable;
mysql> SET FOREIGN_KEY_CHECKS = 1;
 

Be the first to comment

Leave a Reply