您当前的位置:首页 > 计算机 > 软件应用 > 数据库 > MySQL

mysql5.6.21 [Err] 2006和[Err] 1118错误处理

时间:01-17来源:作者:点击数:
CDSY,CDSY.XYZ

1、windows执行大数据量(10M)insert SQL时,提示错误

[Err] 2006 - MySQL server has gone away

  方案:修改My.ini文件,重启mysql服务

max_allowed_packet=4M
修改为
max_allowed_packet=20M

2、重新执行insert,继续报错

[Err] 1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.

  方案:修改My.ini文件,重启mysql服务

innodb_log_file_size=48M
修改为
innodb_log_file_size=512M
CDSY,CDSY.XYZ
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门