Hands-on Lab·MySQL
MySQL Replica Seeding
A replica has to start from a known point, not an empty database. The dump carries a `GTID_PURGED` line that tells the replica what it already has - and getting that line to apply is the step everyone gets wrong.
Replication Guide 27 of 45 Advanced
- OSUbuntu 26.04 LTS (resolute)
- MySQL8.4.10-0ubuntu0.26.04.1
- ReplicationGTID, ROW format, auto-position
- TimeAbout 16 min
- Reviewed27 August 2026
Written against the versions above. `--source-data=2` writes the coordinates as a comment. In MySQL 8.4 `RESET BINARY LOGS AND GTIDS` replaced the older `RESET MASTER`.
| 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 |
Before you start
- The prerequisites guide completed - GTID on, ids unique, repl account created.
-
Create a temporary account that can read everything
-
Pull the dump across the network
-
Clear the replica's own history before loading
-
Confirm the handover landed