1692
MariaDBERRORCommonReplicationHIGH confidence

Unexpected GTIDs found on the replica that are not in the source binlog

Production Risk

High — replication halted; data consistency unverifiable.

What this means

The replica has executed GTIDs that are listed in the source's gtid_purged set but not in the source's binary logs, meaning the replica cannot verify those transactions and replication is unsafe.

Why it happens
  1. 1The source purged binary logs that the replica still needs to validate.
  2. 2Improper promotion of a replica to source without resetting GTID state.
How to reproduce
trigger — this will error
trigger — this will error
-- Observed during START SLAVE or CHANGE MASTER TO when GTID sets mismatch.

expected output

ERROR 1692 (HY000): Found unexpected GTIDs in the relay log.

Fix

Re-initialise the replica from a fresh backup

Re-initialise the replica from a fresh backup
STOP SLAVE;
RESET SLAVE ALL;
-- Restore from mysqldump with --set-gtid-purged=ON
CHANGE MASTER TO MASTER_AUTO_POSITION=1;
START SLAVE;

Why this works

A fresh dump ensures the GTID sets on source and replica are consistent.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1692 ER_FOUND_MISSING_GTIDS

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors