Replication
MySQL replication copies data from a primary (source) server to one or more replica servers asynchronously. Used for high availability, read scaling, and disaster recovery.
MySQL replication copies data from a primary (source) server to one or more replica servers asynchronously. Used for high availability, read scaling, and disaster recovery.
-- Replication flow:
-- 1. Primary writes changes to binary log (binlog)
-- 2. Replica IO thread fetches binlog events
-- 3. Replica writes events to relay log
-- 4. Replica SQL thread applies relay log events
-- Check replication status on replica:
SHOW REPLICA STATUS\G
MySQL 8.0+ uses "replica" instead of "slave" and "source" instead of "master" in command syntax.