Database Administration & Monitoring
MySQL – Foreign keys and “Cannot delete or update a parent row: a foreign key constraint fails” error
08.03.2018 by Elisa Usai
As you know, foreign keys establish a sort of relationship between 2 tables. MySQL requires InnoDB storage engine to support foreign keys. In our example, we have the following parent table in a MySQL 5.7.21 server: mysqld3-(root@localhost) [sakila]> show create(…)