MySQL的數據庫drop不了Cannot delete or update a parent row: a foreign key constraint fails

MySQL的數據庫drop不了, 出現以下message, 可以試下 SET FOREIGN_KEY_CHECKS = 0;


mysql> drop database myDB;

ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails

mysql> SET FOREIGN_KEY_CHECKS = 0;drop database myDB;

Query OK, 0 rows affected (0.00 sec)


Query OK, 4 rows affected (0.01 sec)

你可能感兴趣的:(MySQL的數據庫drop不了Cannot delete or update a parent row: a foreign key constraint fails)