In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail the detailed process of MySQL master-slave replication, and the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
MySQL database replication operation can be roughly divided into three steps, as shown in the following figure:
1. The primary server records changes or updates to the data in the binary log.
two。 The slave server copies the binlog events of the master server to its own relay log (relay log).
3. The SQL thread from the server reads the contents of the relay-log log, performs the various operations recorded in the log in full sequence, and applies them to the slave server.
The detailed process of master-slave synchronization is as follows:
The primary server verifies the connection.
The master server starts a thread for the slave server.
The slave server tells the master server the offset of the master server log.
The primary server checks whether the value is less than the current binary log offset.
If less than, the notification fetches the data from the server.
The slave server continues to fetch data from the master server until it is finished, when the slave server thread goes to sleep, and the master server thread goes to sleep at the same time.
When there is an update on the master server, the master server thread is activated, the binary log is pushed to the slave server, and the slave server thread is notified to enter the working state.
The binary log is executed from the server SQL thread and then goes to sleep.
On the MySQL master-slave replication process is how to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 247
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.