ERROR 2006 (HY000) at line 348: MySQL server has gone away

When i try to restore a MySQL database, i get following error.

[root@server2 ~]# mysql sok_wp < /var/www/sok_wp.sql
ERROR 2006 (HY000) at line 348: MySQL server has gone away
[root@server2 ~]#

To fix the error, edit file

/etc/my.cnf.d/my.cnf

Add

Advertisement

max_allowed_packet=64M

Restart MySQL

service mysql restart

if using mariadb, run

service mariadb restart
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement