database replication

Database replication is used for many purposes. For example, by replicating your databases, you have multiple copies available in case a server crashes or goes offline.Clients can use a different server if the one that they normally use becomes unavailable. Replication also can be used to distribute client load. Rather than having a single server to which all clients connect, you can set up multiple servers that each handle a fraction of the client load.
Database replication uses a master/slave architecture:
* The server that manages the original databases is the master.
* Any server that manages a copy of the original databases is a slave.
* A given master server can have many slaves, but a slave can have only a single master.(If done with care, it is possible to set up two-way or circular replication)

A replication slave is set up initially by transferring an exact copy of the to-be-replicated databases from the master server to the slave server. Thereafter, each replicated database is kept synchronized to the original database. When the master server makes modifications to its databases, it sends those changes to each slave server, which makes the changes to its copy of the replicated databases.