In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what are the formats of MySQL binary logs". In daily operation, I believe many people have doubts about the format of MySQL binary logs. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "what is the format of MySQL binary logs?" Next, please follow the editor to study!
Statement format:
What is recorded is the logical SQL, which is the original SQL statement.
The advantage is that the number of logs is small.
The disadvantage is that the execution of some uncertain functions (such as uuid (), now ()) will lead to master-slave data inconsistency.
Row format: the record is no longer a simple SQL statement, but a record of table row changes
The advantage is that it solves the problem of inconsistency of master-slave data in statement format, and all data can be copied safely, but the disadvantage is that the log volume is large, which affects the replication time of slave log, but the amount of log generation can be reduced by setting the parameter binlog_row_image=MINIMAL.
Mixed format = statement+row: mysql defaults to statement format for recording binary log files, but in some cases row format is used, and row format may be used:
1) the storage engine of the table is NDB, and all DML operations on the table will be recorded in row format.
2) uncertain functions such as uuid (), user (), current_user (), found_rows (), row_count () are used.
3) insert delay statement is used
4) user-defined function UDF is used
5) temporary tables are used
At this point, the study of "what is the format of the MySQL binary log" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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: 0
*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.