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 ...

Get CentOS 7 Server Deployment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.