目录
mysql mysqldump常见报错
ERROR 2006 (HY000) at line 5922: MySQL server has gone away
连接mysql,查看单条数据支持上限,可能因为单条数据上限太小,默认上限是1M
show global variables like 'max_allowed_packet';
| max_allowed_packet | 1048576 |
set global max_allowed_packet=1024102416;
再导入就没报错了
上面是临时方法,永久方法需要修改配置文件并重启mysql服务
vim /etc/my.cnf
max_allowed_packet = 16M
标签:max,mysql,packet,报错,mysqldump,allowed
From: https://www.cnblogs.com/liwenchao1995/p/16873810.html