1. 程式人生 > >MySQL報錯:Packets larger than max_allowed_packet are not all

MySQL報錯:Packets larger than max_allowed_packet are not all

not 有時 ger ria 文件 配置 ets pac 修改方法

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