Applicable to:
- Plesk for Linux
Symptoms
-
Database importing via 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
restore(options, password)
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 -
Subscription migration fails:
PLESK_ERROR: error: Failed to copy content of database 'example_db'
Migration tools tried to perform operation in 3 attempts: Command execution failed on the local server with non-zero exit code.
command: mysql --defaults-file=/usr/local/psa/var/modules/panel-migrator/sessions/<session-ID>/target-server/my_localhost_example_db.cnf -h localhost -P 3306 -uadmin example_db < /usr/local/psa/var/modules/panel-migrator/sessions/<session-ID>/target-server/db-dumps/example_db.sql
exit code: 1
stdout:
stderr: ERROR 2006 (HY000) at line 405: MySQL server has gone away
Cause
Data string in dump is higher than max_allowed_packet default value in MySQL/MariaDB (4 MB).
Resolution
Increase the value of the MySQL/MariaDB parameter max_allowed_packet
using the steps from this article.
Comments
0 comments
Please sign in to leave a comment.