MySQL报错:Packets larger than max_allowed_packet are not all

MySQL根据配置文件会限制Server接受的数据包大小。有时候大的插入和更新会受 max_allowed_packet 参数限制,导致写入或者更新失败。

修改方法:

1.修改配置文件my.ini

max_allowed_packet = 100M

2.使用命令修改

mysql> set global max_allowed_packet = 1024*1024*100

查看是否修改成功的命令mysql> show VARIABLES like ‘%max_allowed_packet%‘;

MySQL报错:Packets larger than max_allowed_packet are not all

上一篇:MySQL-InnoDB事务日志


下一篇:linux下su与sudo