Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: ERROR 2006 (HY000) at line XXX: MySQL server has gone away  (Read 3059 times)

0 Members and 1 Guest are viewing this topic.

joseletk

  • Guest
ERROR 2006 (HY000) at line XXX: MySQL server has gone away
« on: July 07, 2018, 04:50:16 pm »
MySQL database restoration process failed with an error message while restoring a large backup file. I got the below message. After reading about this problem I found that this is not with the size of the backup, this problem occurred when a single package size is greater than allowed packet size.

Code: [Select]
user@vps:~$ mysql -p mydb < mydb.sql

Enter password:
ERROR 2006 (HY000) at line 122732: MySQL server has gone away

Solution:

To solve this problem increase max_allowed_packet size in your mysql configuration. Edit configuration file my.cnf and add following value under [mysql] section.

Code: [Select]
  max_allowed_packet=64M
Set the value as per your requirement and restart MySQL service.
===================================================================