当前位置:Gxlcms > 数据库问题 > MySQL报错:Packets larger than max_allowed_packet are not all

MySQL报错:Packets larger than max_allowed_packet are not all

时间:2021-07-01 10:21:17 帮助过:12人阅读

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

修改方法:

1.修改配置文件my.ini

max_allowed_packet = 10M

2.使用命令修改

mysql> set global max_allowed_packet = 1024*1024*10

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

MySQL报错:Packets larger than max_allowed_packet are not all

标签:插入   24*   pack   根据   写入   失败   MySQL报错   查看   sql   

人气教程排行