1689
MariaDBERRORCommonReplicationHIGH confidence

Replica has more GTIDs than the source

Production Risk

High — replication is stopped; data divergence may exist.

What this means

The replica's GTID executed set contains transactions that do not exist on the source, indicating the replica has diverged. Replication cannot safely continue.

Why it happens
  1. 1Writes were made directly to the replica.
  2. 2Replica was promoted then re-pointed to the original source.
  3. 3Incorrect GTID set after failover.
How to reproduce
trigger — this will error
trigger — this will error
-- Observed in SHOW SLAVE STATUS\G when Slave_SQL_Running: No

expected output

ERROR 1689 (HY000): The slave has more GTIDs than the master has.

Fix

Resync the replica from a fresh dump

Resync the replica from a fresh dump
-- On source:
mysqldump --single-transaction --master-data=2 --all-databases > full.sql
-- On replica:
STOP SLAVE;
RESET SLAVE ALL;
-- Import dump, then:
CHANGE MASTER TO ... FOR CHANNEL '';
START SLAVE;

Why this works

A fresh dump with GTID information resets the replica to a known-good state.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1689 ER_SLAVE_HAS_MORE_GTIDS_THAN_MASTER

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

← All MariaDB errors