User Tools

Site Tools


mysql:foreign-key-contraints

MySQL DB Importation error w.r.t. Foreign Key Constraints failure

When importing a MySQL DB in N99panel, via MySQL DB import functionality, and if you see any error under N99panel tasks pertaining to ‘Cannot add or update a child row: a foreign key constraint fails’ or any similar errors w.r.t. foreign key constraints failure, please do the following action.

Place the following line

SET SESSION FOREIGN_KEY_CHECKS=0;

as the very first line in your SQL File , and try re-importing again. This should solve the issue.

mysql/foreign-key-contraints.txt · Last modified: 2024/04/07 04:44 by kirtisingh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki