For those of you who are faced to this type of error, the command “SHOW ENGINE INNODB STATUS;” is your friend.

[...]
------------------------
LATEST FOREIGN KEY ERROR
------------------------
130322 12:03:42  Cannot drop table `test`.`events`
because it is referenced by `test`.`attachments`
[...]

Here it is my 2 cents of the day 😉

Tip Mysql : Cannot delete or update a parent row: a foreign key constraint fails

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.