IT lexicon Database GTID replication

GTID replication

Database På svenska → Updated: 2026-05-29

Global Transaction Identifier — a system in MySQL where every transaction gets a globally unique ID. It makes replication and failover much more robust: a replica knows exactly which transactions it has already applied, regardless of which binlog file/position they were at.

Problem solved: traditional MySQL replication pointed at a position with (binlog file, offset), which was fragile during failover — if the primary was swapped out, you didn't know which position corresponded to what on the new one. GTID gives each transaction an ID (the server's UUID + sequence number), so a replica can say "I've run everything up to these GTIDs" and easily be repointed to a new primary without manual position arithmetic. Win: automatic failover, easier topology changes, idempotent application (the same GTID is never run twice). Standard in modern MySQL setups and a prerequisite for tools like Orchestrator. Builds on top of the binlog. Related to binlog and group replication.

← Back to the lexicon