Apr 30, 2018

How to import mysql dump data with foreign key constraints

mysql> SET foreign_key_checks = 0;
mysql> SOURCE your_db_dump_file;
mysql> SET foreign_key_checks = 1;

You can monitor it with "show processlist", such as A simple python script to keep an eye on mysql process