<<Back to MySQL & MariaDB Main Page
MySQL Replication Overview
Replication is a feature allowing the contents of one or more servers (called masters) to be mirrored on one or more servers (called slaves)You can setup the replication at following levels
All databases
One or more databases
Tables within a database
Since replication is using binary log to replicate the transactions, it is mandatory requirement to have the database in binary logging mode setup replication.
How MySQL Master/Slave Replication Works
1> MySQL master server writes the changes in bnary log in a sequential manner
2> I/O thread of slave MySQL then pulls these changes from Master over the network and writes them in relay log.
3> SQL Thread of slave MySQL then replicates these changes to slave database.
The slave server keeps track of the position in the master's binlog of the last event applied on the slave. This allows the slave server to re-connect and resume from where it left off after replication has been temporarily stopped.
Comments
Post a Comment