In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what is the meaning of mysql synchronization". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Mysql's Replication is an asynchronous replication process, replicating from one Mysql instace (we call it Master) to another Mysql instance (we call it Slave). The whole replication process between Master and Slave is mainly completed by three threads, of which two threads (Sql thread and IO thread) are on the Slave side, and the other thread (IO thread) is on the Master side. In order to realize the Replication of MySQL, we must first turn on the Binary Log (bin.xxxxxx) function on the Master side, otherwise it cannot be realized.
1. The IO thread on the Slave connects to the Master and requests the log contents from the specified location of the specified log file (or from the beginning of the log)
2. After Master receives the request from the IO thread of Slave, the IO thread responsible for replication reads the log information after the specified location of the log according to the request information, and returns it to the IO thread on the Slave side. In addition to the information contained in the log, the returned information also includes the name of the Binary Log file on the Master side and the location in the Binary Log.
3. After receiving the information, the IO thread of Slave writes the received log contents to the end of the Relay Log file (mysql-relay-bin.xxxxxx) on the Slave side, and records the file name and location of the read binlog on the Master side into the master-info file, so that it can clearly Master at a high speed on the next read. "where do I need to start the log content in a certain bin-log? please send it to me."
4. After Slave's SQL thread detects a new addition to Relay Log, it immediately parses the contents of the Log file into executable Query statements that are actually executed on the Master side, and executes these Query on its own. In this way, the same Query is actually executed on both the Master side and the Slave side, so the data on both sides is exactly the same.
This is the end of the content of "what does mysql synchronization mean?" thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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: 211
*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.