Starting in Version 3.23.15, MySQL supports one-way replication internally. One server acts as the master, while one or more other servers act as slaves. The master server keeps a binary log of updates (see Binary log). It also maintains an index file of the binary logs to keep track of log rotation. Each slave, upon connecting, informs the master where it left off since the last successfully propagated update, catches up any updates that have occurred since then, and then blocks and waits for the master to notify it of new updates.
A slave can also serve as a master if you set up chained replication servers.
Note that when you are using replication, all updates to the tables that are replicated should be performed on the master server. Otherwise, you must always be careful to avoid conflicts between updates that users make to tables on the master and updates that they make to tables on the slave.
One-way replication has benefits for robustness, speed, and system administration:
Robustness is increased with a master/slave setup. In the event of problems with the master, you can switch to the slave as a backup.
The extra speed is achieved by splitting the load for processing client queries between the master and slave servers, resulting in better client response time. SELECT queries may be sent to the slave to reduce query processing load of the master. Queries that modify data should still be sent to the master so that the master and slave to not get out of sync. This load-balancing strategy is effective if non-updating queries dominate, but that is the normal case.
Another benefit of using replication is that one can get non-disturbing backups of the system by doing a backup on a slave instead of doing it on the master. See Backup.