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 (4 MB).
Resolution
Increase the value of the MySQL parameter max_allowed_packet
using the steps from this article.
Comments
5 comments
I'm trying to migrate from Plesk Obsidian Version 18.0.30 Update #2 to the Plesk Obsidian Web Pro Edition
Version 18.0.30 Update #2
During the migration I've got a error message "stderr: ERROR 2006 (HY000) at line 724: MySQL server has gone away"
According to this post - https://support.plesk.com/hc/en-us/articles/213941425-Database-import-in-Plesk-fails-ERROR-2006-HY000-MySQL-server-has-gone-away I've changed my.cnf file settings - https://prnt.sc/v3w7hf
I've 1 domain with 600 Mb DB , 2nd domain with the 64Mb DB , and small domain with 12 Mb DB - but error the same -
it means that's not a time execution time or memory limit.
========1===========
stderr: ERROR 2006 (HY000) at line 724: MySQL server has gone away
======2===========
stderr: ERROR 2006 (HY000) at line 693: MySQL server has gone away
====3=========
stderr: ERROR 2006 (HY000) at line 693: MySQL server has gone away
I asking my hosting support but they can't help me.
Do you have any options except of my.cnf file changes and MySQL restart ?
here it is full error result -
Failed to copy content of database 'db-name1'
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/20201017095432/target-server/my_localhost_db-name1.cnf -h localhost -P 3306 -uadmin db-name1 < /usr/local/psa/var/modules/panel-migrator/sessions/20201017095432/target-server/db-dumps/db-name1.sql
exit code: 1
stdout:
stderr: ERROR 2006 (HY000) at line 1025: MySQL server has gone away
Source server
CentOS 6.10 (Final)
Target Server
CentOS 7.8.2003 (Core)
Hello SergeyK
Please, try this article.
In case it won't help, additional investigation will be required. Use this instruction to contact Plesk Support Directly.
Hello,
I am getting error while installing wordpress on the Domain i bought with hosting.
Please help to sort out as i have been trying for two days and cannot get wordpress installed.
Please see attachment for error.
Please sign in to leave a comment.