首页 > 数据库 > 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
 
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


相关热词搜索:

上一篇:mysql binlog日志恢复
下一篇:MySQL8创建用户,授权