首页 >
数据库 >
mysql
mySQL_解决ERROR 2006 (HY000) at line XX MySQL server has gone away问题
时间:2019-03-06 10:39:49 点击: 来源: 作者:
1、修改mysqld的配置文件my.cnf调整max_allowed_packet的值,修改为5M就比较合适了。 [mysqld]port = 3308socket = /dev/shm/mysqld.sockskip-external-lockingkey_buffer_size = 16Mmax_allowed_ ...
1、修改mysqld的配置文件my.cnf
调整max_allowed_packet的值,修改为5M就比较合适了。
[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、修改[mysqld]中的值
[mysqldump]
quick
max_allowed_packet = 10M
参考:http://www.111cn.net/database/mysql/106911.htm
”您可通过以下微信二维码,赞赏作者“