CertGrid CertGrid
Troubleshooting·MySQL

MySQL Replica Write Protection

A fresh replica is not read-only. A write to it succeeds, diverges the data and plants a transaction the source has never heard of - and `super_read_only` is the one-line prevention.

Replication Guide 29 of 45 Intermediate

Written against the versions above. `read_only` alone does not stop users with the SUPER privilege - which includes root, and therefore most people connecting to fix something. `super_read_only` is the one that means it.

The 2 hosts these commands ran on: db-a01, db-b01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB
db-b01192.168.0.82Ubuntu 26.04 LTSStandby / Replica / Replica Set Member 22 Core4 GB50 GB

Before you start

  1. Discover that the replica accepts writes

  2. See what that write did to the GTID history

  3. Close the door

  4. Confirm replication still works through it

Official sources