Last Updated: February 25, 2016
·
782
· lenz

Solve MySQL import problems

From my experience there are at most two types of problems when restoring from MySQL database dumps. You did not disable foreign key checks or your table uses zero as a starting index. To handle both prepend the following to your MySQL dumps:

SET FOREIGNKEYCHECKS=0;
SET SQLMODE="NOAUTOVALUEON_ZERO";