Home >
database > Senior engineer/interview will be a MySQL database - interview - MySQL DBA interview questions (a to
Senior engineer/interview will be a MySQL database - interview - MySQL DBA interview questions (a to
Senior engineer/interview will be a MySQL database - interview - MySQL DBA interview questions (a total of 3 sets)
Principle and process of 1.1 1, MySQL replication
(1), the basic principle of replication process
1. Main: binlog thread - to record all changed the statement, the database data into the binlog on the master;
2. From: IO thread -- after using start slave, is responsible for the pull from the master binlog content, in his relay log
; From: SQL execution threads -- perform relay in the log statements;
(2), several MySQL replication thread and the correlation between
MySQL replication is based on the following three threads of interaction (multithreaded copying should be 4 class thread) :
1. Master the binlog dump thread, the thread is responsible for the Master of the binlog event to the slave;
2. Above the Slave IO thread, the thread is responsible for receiving the Master coming binlog, and written to relay the log.
3. The Slave SQL thread, the thread is responsible for reading relay log and execution;
4. If it is a multithreaded copying, whether library level of false multi-threaded or MariaDB 5.6 or 5.7 of real multithreaded copying, SQL line
Cheng do the coordinator, responsible for only the relay binlog read out of the log and then to the worker thread, thread woker negative
The implementation of responsibility for specific binlog event
More job interview questions, please download the attachment...
Download address:
https://download.csdn.net/download/mfkqwyc86/10890382
https://download.csdn.net/download/mfkqwyc86/10890644
https://download.csdn.net/download/mfkqwyc86/10890791