Error during execution of SQL queries: ERROR 2006 (HY000): MySQL server has gone away

Created:

2016-11-16 13:10:21 UTC

Modified:

2017-08-21 15:08:12 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error during execution of SQL queries: ERROR 2006 (HY000): MySQL server has gone away

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx

Symptoms

The following error message occurs during execution of SQL queries or importing a database:

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 62
Current database: apsc

Cause

Data string in dump higher than default max_allowed_packet value in MySQL (4 MB)

Resolution

1. Add or increase the following parameter in /etc/my.cnf file under [mysqld] section:

# cat /etc/my.cnf | grep max_allowed_packet
max_allowed_packet=64M

2. Restart mysqld service to apply changes:

# service mysqld restart

3. Or in case you have CentOS 7:

# service mariadb restart

Have more questions? Submit a request
Please sign in to leave a comment.