- Plesk for Linux
Importing the database via Plesk > Domains > example.com > Databases > Import Dump fails:
PLESK_ERROR: ERROR 2006 (HY000) at line 1253: MySQL server has gone away
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
The same issue occurs during a website migration.
Data string in dump higher than the default value of the parameter max_allowed_packet in MySQL (4 MB).
Increase the value of the MySQL parameter
max_allowed_packet as described in this article: