Tag Archives: constraint fails

Temporary avoid MySQL “Cannot delete or update a parent row: a foreign key constraint fails”

mysql> SET foreign_key_checks = 0;
mysql> DROP table ...;
mysql> SET foreign_key_checks = 1;

Ref: http://stackoverflow.com/questions/2300396/force-drop-mysql-bypassing-foreign-key-constraint