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 - 2023
Версия от 08:39, 10 сентября 2019; Admin iph (обсуждение | вклад) (Новая страница: « === MySQL - ERROR 1217 (23000): Cannot delete or update a parent row: a foreign key constraint fails === При удалении базы mymail получае…»)
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;