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

You might also like

Change root password in MySQL
In GNU/Linux:$ sudo mysqld_safe --skip-grant-tables & $ mysql -u root -p #press enter to use a...

Connect to MySQL over SSH with MySQL Workbench
If you don't have phpMyAdmin installed on your server or you don't feel comfortable using it there's...

Can’t change user options in MySQL Administrator
May be you installed MySQL 5 and you are not able to change user information, schema privileges and resources...

Can’t change user options in MySQL Administrator
May be you installed MySQL 5 and you are not able to change user information, schema privileges and resources...

Leave a Comment

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