Force DROP TABLE in MySQL with foreign key constraint

When trying to update a local copy of one of my MySQL databases, I got the error
Cannot delete or update a parent row: a foreign key constraint fails
when issuing the command

As I immediately recreate the tables with the necessary foreign key constraints, I wanted to temporarily remove the constraints. After some Googl’ing, I learned that it is as simple as

 

 

Share

Leave a Reply

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

This blog is kept spam free by WP-SpamFree.