MySQL dump import -> Error 1217
When using innodb tables and foreign key constraints, importing a mysqldump can sometimes generate foreign key errors.
Add to the beginning of the dump file: SET FOREIGN_KEY_CHECKS=0;
Add to the end of the dump file: SET FOREIGN_KEY_CHECKS=1;
This disables foreign key checks for the mysqldump import session only, allowing the data to be imported without the error being generated.





