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

Today I imported the MySQL database and I got the following error:

# mysql -u root -p db_test < test.db
Enter password:
ERROR 2006 (HY000) at line XX: MySQL server has gone away

It is because the data (SQL query) is too large to imported. To solve this problem, simply edit the MySQL configuration files: /etc/my.cnf

Replace the following from:

max_allowed_packet = 1M

To:

max_allowed_packet = 16M

Or something higher.

Restart the MySQL server again and the problem will be gone.

 /etc/init.d/mysqld restart

 

thueserve 728x90 ERROR 2006 (HY000) at line 526: MySQL server has gone away

Incoming search terms:

digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb