1. Principle
[3 Threads complete Master-slave replication]
Master Library A thread is responsible for logging database change logs
A thread from a library is responsible for pulling the change log of the main library
One thread from the library is responsible for executing the change log for the main library
2. Illustrations
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/79/30/wKiom1aLL2LwUhCAAABxm1MPrxA748.png "title=" MySQL master-slave copy. png "alt=" Wkiom1all2lwuhcaaabxm1mprxa748.png "/>
Additional points:
1) Web-based Web site generally read and write less, so you can use a master more from, read and write separation, writing the main library read from the library, to achieve the purpose of sub-pressure.
2) master-slave replication, the master-slave between the general asynchronous implementation, so there is a master-slave delay problem.
This article is from the "Cock Silk counter attack" blog, please make sure to keep this source http://5731674.blog.51cto.com/5721674/1731614
MySQL Master-slave replication