Configuring MySQL replication
This recipe teaches you how to configure MySQL's master-slave replication to maintain mirror copies of your databases in near real time.
To replicate data, the master MySQL server records details about any changes that take place (inserts, updates, and so on) to a file known as the binary log. Each slave server connects to the master's system, reads the information from the log file, and then duplicates the change to maintain their own local copy of the database. Each slave server is responsible for itself, which means we can bring a slave down for maintenance without affecting the availability of the master. Once it comes back online, the slave resumes replication from where it left off.
Replication can be useful in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access