- Plesk for Linux
When importing a database dump to a non-empty database at Domains > example.com > Databases, the following error message appears in Plesk:
PLESK_ERROR: ERROR 1062 (23000) at line: Duplicate entry '' for key 'PRIMARY'
Traceback (most recent call last):
File "/usr/local/psa/admin/sbin/dbbackup", line 6, in <module>
File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 99, in main
File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line 88, in restore
raise Exception("program 'mysql' finished with non-zero exit code: %d" % p.returncode)
Exception: program 'mysql' finished with non-zero exit code: 1
Database dump issue.
Note: If you are a domain owner and do not have an access to a Plesk server, contact your hosting provider.
Connect to a Plesk server via SSH.
Replace all "INSERT INTO" entries with "INSERT IGNORE INTO":
# replace 'INSERT INTO' 'INSERT IGNORE INTO' -- /path/to/database_dump.sql
Import the modified database again.