1. Three threads: Main Library binlog dump thread, from library I/O thread and SQL thread.
2.creation Process: When replication starts from the library (start Slave), you first createI/Othreads Connect to the main library, and the main library then createsBinlog Dumpthread readsBinlogevents in the log (Event) sent toI/Othreads,I/Oafter the thread gets the event, update the relay log from the library (Relay Log), and then from the librarySQLthe thread reads the events in the trunk log and applies them.
3. Span style= "Font-family:simsun;" lang= "ZH-CN" xml:lang= "ZH-CN" > follow-up procedure:
One, main library binlog dump thread reads binlog Span style= "Font-family:simsun;" lang= "ZH-CN" xml:lang= "ZH-CN" > events in log ( event ) sent to i/o thread;
Second,I/o thread Gets the event update from the Library relay log (relaylog);
Third, read the events in the trunk log from the SQL thread on the library and apply.
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/0C/wKiom1gkfbKD1akjAACT_-bgaF0950.png-wh_500x0-wm_3 -wmp_4-s_4048576214.png "title=" copy principle. PNG "alt=" Wkiom1gkfbkd1akjaact_-bgaf0950.png-wh_50 "/>
This article is from the "Data Chen" blog, please be sure to keep this source http://jianhuchenmou.blog.51cto.com/7449945/1871628
MySQL Replication principle