MySQL restore Error: ERROR 2006 (HY000) at line 2968: MySQL server has gone away
ERROR 2006 (HY000) at line 2968: MySQL server has gone away
This error usually happens while restoring large database dumps in MySQL.
This article explains the steps to resolve this problem.
Step1: Login to the MySQL server via SSH as root.
Step2: Open the MySQL configuration file.
#vi my.cnf
Step3: Add or modify the following line.
max_allowed_packet=128M
Please note that this vale might need to be increased according to the size of the database.
Step4: Restart MySQL service.
#systemctl restart mysqld
Now we can restore the dump file without any issues.
That's all…