关闭

log event entry exceeded max_allowed_packet

1817人阅读 评论(0) 收藏 举报
分类:
现象:
[ERROR] Slave I/O: Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master', Error_code: 1236
[Note] Slave I/O thread exiting, read up to log 'mysql-bin.000012', position 7985



解决办法:
1.分别在Master和slave上增加max_allowed_packet


Master:
mysql> select @@global.max_allowed_packet/1024/1024 MB;
+-------------+
| MB          |
+-------------+
| 16.00000000 |
+-------------+
1 row in set (0.00 sec)




mysql>set @@global.max_allowed_packet=32*1024*1024;




mysql> select @@global.max_allowed_packet/1024/1024 MB;
+-------------+
| MB          |
+-------------+
| 32.00000000 |
+-------------+
1 row in set (0.00 sec)






Slave:
mysql>stop slve;
mysql>set @@global.max_allowed_packet=32*1024*1024;
mysql>start slave;




2.分别在Master和slave的my.cnf中设置max_allowed_packet
max_allowed_packet        = 32M
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1758832次
    • 积分:21810
    • 等级:
    • 排名:第351名
    • 原创:482篇
    • 转载:6篇
    • 译文:6篇
    • 评论:99条