- Plesk for Linux
The following error occurs on attempt to import a database dump via Domains > example.com > Databases:
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
- Import is being made to non-empty database.
Database dump issue.
Connect to the server via SSH.
INSERT INTOentries with
INSERT IGNORE INTO:
# replace 'INSERT INTO' 'INSERT IGNORE INTO' -- /path/to/backup.sql
Another option is to recreate database dump via Plesk with the following instruction.