首页 > 代码库 > navicat 导入数据报错 --- 1153 - got a packet bigger than 'max_allowed_packet' bytes

navicat 导入数据报错 --- 1153 - got a packet bigger than 'max_allowed_packet' bytes

 

navicat 导入数据报错 --- 1153 - got a packet bigger than ‘max_allowed_packet‘ bytes

今天在用navicat导入sql文件时报错:mysql 错误 err [imp] 1153 - got a packet bigger than ‘max_allowed_packet‘ bytes

查了一下,原来是mysql默认读取执行的sql文件最大为16m,我这个sql文件260m,所以执行不过去

解决方法:

在mysql安装目录下找到文件my.ini,搜索[mysqld],在其下面添加一句话

max_allowed_packet=400m

重启mysql服务

这个大小按自己的sql文件大小而设

navicat 导入数据报错 --- 1153 - got a packet bigger than 'max_allowed_packet' bytes