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, butpt-heartbeatwas 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 newbinlog_checksumoption defaults tocrc32. since that option did not exist in mysql 5.5, the replica can’t handle the checksums coming from the master. therefore i recommend settingbinlog_checksum=nonein 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:
set global binlog_checksum='none';
then i added this to my.cnf so it would survive a restart:
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 executedchange masteron the active master to skip the checksummed events.
once the other master is upgraded i can go back and consider changingbinlog_checksumtocrc32.