MySQL server has gone away 异常
作者:互联网
导入数据库时会报 MySQL server has gone away错误,原因是文件太大导致的;
1.查看 show global variables like 'max_allowed_packet';
2. 修改value的大小为16M set global max_allowed_packet=1024*1024*16;
但是mysql重新启动后,设置就失效了,若要一劳永逸,需要修改配置文件
/etc/my.cnf配置下修改:
max_allowed_packet=16M
标签:gone,max,away,global,packet,server,allowed 来源: https://www.cnblogs.com/guanbin-529/p/11440872.html