MySQL replica stops with GTID mismatch after skipping a transaction during a network outage
Environment
MySQL 8.0.33 primary (master) and asynchronous replica, GTID_MODE=ON, enforce_gtid_consistency=ON, network outage occurred between primary and replica during heavy writes (multi-statement transactions and some non-deterministic functions used).
Symptoms
After reconnecting, the replica IO/SQL threads error out with messages referring to GTID inconsistencies and 'Found event for a different server UUID' or statements that have already been executed. Attempts to SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1 allow the slave to start briefly but the error returns when the next conflicting transaction is processed; replication cannot be resumed reliably.
Observations
SHOW SLAVE STATUS reports Last_SQL_Error referencing a specific GTID and 'Could not find event' style errors. The primary's binlog and GTID_PURGED/GTID_EXECUTED sets differ from the replica's executed set. There were no intentional writes on the replica, and the replica was read-only prior to the outage. No physical disk corruption observed.
Already attempted
Tried STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE to bypass single offending events (temporary relief). Examined relay logs and tried mysqlbinlog to extract problematic statements, but the GTID ordering and presence of non-deterministic statements made manual correction risky. Avoided using RESET SLAVE ALL due to worry about losing replication positioning.
Question
How can I safely recover a GTID-based replica that refuses to apply certain transactions after a network outage and a manual skip? Is a full reclone from the primary required, or are there safer reconciliation steps to rebuild GTID consistency without data loss?
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
- Databases26% match
MySQL Replica Reports Binlog Checksum Mismatch After Changing Binlog_Format to ROW on Primary
Open0 answers - Databases24% match
MySQL replica SQL thread idles and relay logs grow after short network blips — slave lags and no obvious errors
Open0 answers - Databases23% match
PostgreSQL standby stops applying WAL during long-running transactions on primary after pg_basebackup restore
Open0 answers