ERROR 2006 (HY000) at line 749: MySQL server has gone away (MariaDB/MySQL)

OS:CentOS Linux release 7.1.1503
DB: MariaDB 5.5.44

Importing a big mysql dump file resulted in the following error:

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

Line 749 was a very big INSERT query. To fix this, place the following into /etc/my.cnf.d/large.cnf

[mysqld]
max_allowed_packet = 64M
wait_timeout = 6000

[mysqldump]
max_allowed_packet = 64M

Then restart mariadb/mysqld:

systemctl restart mariadb
Advertisements
ERROR 2006 (HY000) at line 749: MySQL server has gone away (MariaDB/MySQL)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s