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

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 😉

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

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