MySQL Replica Reports Binlog Checksum Mismatch After Changing Binlog_Format to ROW on Primary
Environment
Primary: MySQL 8.0.32 on Ubuntu 22.04 (binlog_format=ROW, binlog_checksum=CRC32), Replica: MySQL 8.0.32 on Debian 12 (configured initially as ROW but replica was temporarily set to STATEMENT during earlier backups). GTID-based replication used. TLS between nodes.
Symptoms
Replica I/O thread connects to primary but slave SQL thread stops applying events with error: 'Error reading from master: got error 1236: Could not find first log file name in binary log index file' and later shows 'relay log read failure: checksum mismatch' for several relay log files. Replication lags and then halts; SHOW SLAVE STATUS shows Last_SQL_Error mentioning 'Could not read event' and relay files appear shorter than on primary.
Observations
Primary's mysqlbinlog output for recent events matches expected ROW events. Replica's relay logs for the same time window differ in size and contain truncated events. Network traces show brief TCP resets between primary and replica during late-night backups of replica filesystem, coinciding with the time errors start. Replica's my.cnf had binlog_checksum=NONE previously and was recently changed to CRC32; relay logs created before the change are present and some checksums do not match.
Already attempted
Stopped and restarted replication threads, forced STOP SLAVE / START SLAVE, ran mysqlbinlog to validate primary logs, set replicate-wild-ignore-table temporarily, moved older relay logs out of datadir, tried CHANGE MASTER TO MASTER_LOG_FILE=..., MASTER_LOG_POS=..., but replica still reports checksum mismatch or event parse errors. Did not run a fresh full backup/restore yet due to dataset size.
Question
How can I safely recover replication given relay-log checksum mismatches after binlog_format/binlog_checksum changes and intermittent network resets, and what reversible diagnostics should I run before performing a full re-sync?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags