Hands-on Lab·MySQL
MySQL Replication Startup
Point the replica at the source, start it, and read the five fields of SHOW REPLICA STATUS that actually matter. Then prove it works by writing a row on one host and finding it on the other.
Replication Guide 28 of 45 Intermediate
- OSUbuntu 26.04 LTS
- MySQL8.4.10-0ubuntu0.26.04.1
- ReplicationGTID, ROW format, auto-position
- TimeAbout 15 min
CHANGE REPLICATION SOURCE TO and START REPLICA replaced CHANGE MASTER TO and START SLAVE in 8.0.22. The old forms still work but are deprecated.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| db-a01 | 192.168.0.81 | Ubuntu 26.04 LTS | Primary / Source / Replica Set Member 1 | 2 Core | 4 GB | 50 GB |
| db-b01 | 192.168.0.82 | Ubuntu 26.04 LTS | Standby / Replica / Replica Set Member 2 | 2 Core | 4 GB | 50 GB |
This guide includes
Use this once the replica is seeded and has to start following. This matters because SHOW REPLICA STATUS returns about sixty fields and only five of them tell you whether it is actually working.
- pointing the replica at its source in one statement
- reading the five fields that matter out of the sixty
- proving it by writing on one host and reading on the other
Before you start
- A seeded replica - see the previous guide.
-
Point the replica at its source and start it
-
Read the fields that matter
-
Prove it by writing on one host and reading on the other