log event entry exceeded max_allowed_packet

现象:
[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
阅读更多
个人分类: MySQL
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭