Symptoms
When importing a database dump at Domains > example.com > Databases > Import Dump, the operation fails with one of the following error messages in Plesk:
Unable to import the example_com dump:
ERROR 1452 (23000) at line 4907226: Cannot add or update a child row: a foreign key constraint fails 
Unable to import the example_com dump:
ERROR 1215 (HY000) at line 15: Cannot add foreign key constraint
Unable to import the example_com dump:
ERROR 1215 (HY000) at line 15: Cannot delete or update a parent row: a foreign key constraint fails
Cause
Incorrect database design.
Resolution
Apply one of the following solutions.
- 
Open a database dump in a text editor. 
- 
Add the line below at the beginning of the file: SET FOREIGN_KEY_CHECKS=0; 
- 
Go back to Plesk and restore this dump at Domains > example.com > Databases > Import Dump. 
- 
Connect to the Plesk server via SSH. 
- 
Start MySQL: # plesk db 
- 
Temporary disable foreign key checks in MySQL with the command: mysql> SET GLOBAL FOREIGN_KEY_CHECKS=0; 
- 
Go back to Plesk and restore the database dump at Domains > example.com > Databases > Import Dump. 
- 
Enable foreign key checks in MySQL back: mysql> SET GLOBAL FOREIGN_KEY_CHECKS=1; 
- 
Exit MySQL: mysql> exit