MySQL - ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
MySQL - ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
При удалении базы mymail получаем ошибку вида:
MariaDB [(none)]> drop database mymail; ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails
Решение этой проблемы:
MariaDB [(none)]> SET FOREIGN_KEY_CHECKS=0; drop database mymail; SET FOREIGN_KEY_CHECKS=1;