Cannot update relationships between tables in mysql
by kkoistinen from LinuxQuestions.org on (#5B590)
Hello everyone,
I just restored old sql database from backup. Last time I was using it there were working relationships. However as I am trying to get those relationships back to work I get following error:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`Gematriatietokanta`.`#sql-186c_2d`, CONSTRAINT `toiminta_ja_muut_tiedot_ibfk_1` FOREIGN KEY (`sana_idsana`) REFERENCES `sana` (`idsana`) ON DELETE RESTRICT ON UPDATE RESTRICT)
I am using Linux Kubuntu 20.04, phpMyAdmin and MySQL 8.0.19.
Yours,
Kimmo


I just restored old sql database from backup. Last time I was using it there were working relationships. However as I am trying to get those relationships back to work I get following error:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`Gematriatietokanta`.`#sql-186c_2d`, CONSTRAINT `toiminta_ja_muut_tiedot_ibfk_1` FOREIGN KEY (`sana_idsana`) REFERENCES `sana` (`idsana`) ON DELETE RESTRICT ON UPDATE RESTRICT)
I am using Linux Kubuntu 20.04, phpMyAdmin and MySQL 8.0.19.
Yours,
Kimmo