(mysql.info.gz) Replication Intro
Info Catalog
(mysql.info.gz) Replication
(mysql.info.gz) Replication
(mysql.info.gz) Replication Implementation
6.1 Introduction to Replication
===============================
MySQL 3.23.15 and up features support for one-way replication. One
server acts as the master, while one or more other servers act as
slaves. The master server writes updates to its binary log files, and
maintains an index of the files to keep track of log rotation. These
logs serve as a record of updates to be sent to slave servers. When a
slave server connects to the master server, it informs the master of
its last position within the logs since the last successfully
propagated update. The slave 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 server can also serve as a master if you want to 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.
* Better response time for clients can be achieved by splitting the
load for processing client queries between the master and slave
servers. `SELECT' queries may be sent to the slave to reduce the
query processing load of the master. Statements that modify data
should still be sent to the master so that the master and slave do
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 you can perform
backups using a slave server without disturbing the master. The
master continues to process updates while the backup is being made.
Backup.
Info Catalog
(mysql.info.gz) Replication
(mysql.info.gz) Replication
(mysql.info.gz) Replication Implementation
automatically generated byinfo2html