1. Modify MySQL’s configuration file my.cnf
Adjust the value of max_allowed_packet to 5M, which is a suitable size.
[mysqld]
port = 3308
socket = /dev/shm/mysqld.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 10M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
2. Modify the values under [mysqld]
[mysqldump]
quick
max_allowed_packet = 10M
Reference: http://www.111cn.net/database/mysql/106911.htm