原文:
Disabling Binlog_checksum for MySQL 5.5/5.6 Master-master Replication
Replicating from a newer major version to an older major version in MySQL (for example a 5.6 master and a 5.5 replica) is generally not recommended, but when upgrading a master-master replication topology it’s hard to avoid this scenario entirely. We ended
up in this situation last week when upgrading the passive master of an active-passive master-master pair from 5.5 to 5.6. The primary replication flow was going from the active master (5.5) to the passive master (5.6) with no errors, but pt-heartbeat was running
on the passive master, which led to a replication failure with this error on the active master:
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘Slave can not handle replication events with the checksum that master is configured to log; the first event ‘bin-log.002648’ at 4, the last event read from ‘/var/lib/mysqllogs/bin-log.002648’
at 120, the last byte read from ‘/var/lib/mysqllogs/bin-log.002648’ at 120.’
Why did this happen? Starting in MySQL 5.6.6, the new binlog_checksum option defaults to CRC32. Since that option did not exist in MySQL 5.5, the replica can’t handle the checksums coming from the master. Therefore I recommend setting binlog_checksum=NONE in
my.cnf as part of the upgrade process for a master-master setup to avoid this error.
My fix was to run this on the passive master:
1
set global binlog_checksum=`NONE`;
Then I added this to my.cnf so it would survive a restart:
1
binlog_checksum=NONE
After that change was made I examined the binary log to confirm that it did not include anything other than pt-heartbeat activity, and then executed CHANGE MASTER on the active master to skip the checksummed events.
Once the other master is upgraded I can go back and consider changing binlog_checksum to CRC32.
Apr 29th, 2014
MySQL
Comments
Posted by Ike Walker
翻譯:
禁用Binlog_checksum MySQL 5.5/5.6 -主複製
從新的主要版本複製到一個年長的主要版本在MySQL中(例如5.6大師和一個5.5副本)通常不推薦,但是當升級-主複製拓撲ita€™年代很難完全避免這種情況。 在這種情況下我們最終上週升級主被動的被動主-主副從5.5到5.6。 主複製流從活躍的主人(5.5)的被動大師(5.6),沒有錯誤,但是pt-heartbeat是執行在被動的主人,導致複製失敗與主動掌握這個錯誤:
Last_IO_Error:有致命錯誤1236從二進位制日誌讀取資料時從主:一個€˜奴隸不能處理複製事件的校驗和主配置日誌;第一個事件€˜bin-log。 002648一個€™4,最後一個事件讀取€˜/ var / lib / mysqllogs / bin-log。 002648一個€™120歲的最後一個位元組讀取€˜/ var / lib
/ mysqllogs / bin-log。 002648一個€™在120.€™
為什麼會這樣? 從MySQL 5.6.6,新的binlog_checksum
選擇預設值CRC32
。
自該選項不存在在MySQL 5.5中,複製品迦南€™t處理來自大師的校驗和。 因此我建議設定binlog_checksum =沒有
作為在my . cnf中所做的升級過程-主設定以避免這個錯誤。
我的修復是執行這個被動的主人:
1
|
set global binlog_checksum=`NONE`;
|
然後我新增了所以在my . cnf中所做生存一個重啟:
改變後我檢查了二進位制日誌來確認它不包括任何pt-heartbeat活動,然後執行修改主
在活動的主人跳過校驗和事件。
一旦其他大師升級我可以回去考慮改變binlog_checksum
來CRC32
。
原文:
http://mechanics.flite.com/blog/2014/04/29/disabling-binlog-checksum-for-mysql-5-dot-5-slash-5-dot-6-master-master-replication/