In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to convert bin-log log files into sql files in mysql, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
View mysqlbinlog version
Mysqlbinlog-V [--version]
Check the binlog log open status
Show variables like'% log_bin%'
When mysql opens the bin-log log, the non-query operation of the mysql database saves the record to the bin-log file. General bin-log log files can not be opened to view, need to use mysql tools. Suppose the binary file mysql-bin.000011 is stored in the / mysql/data/ directory. You need to export the sql statement about the database tide in the log file mysql-bin.000011 to the file tide.sql, as follows:
/ / transfer the sql of the binlog log file about the tide library to the file mysqlbinlog mysql-bin.000011-d tide > tide.sql / / Select a time range to export mysqlbinlog-- start-date= "2017-08-12 15:00:19"-- stop-date= "2017-08-12 15:30:19" mysql-bin.000011-d tide > tide.sql
If the binlog log file is recorded in ROW format
/ / transfer the binlog log file in row format to the file after base64 parsing, and-v represents line break to show mysqlbinlog-- base64-output=decode-rows-v mysql-bin.000011-d tide > tide.sql
After execution, a tide.sql file will be generated in the current directory. You can use vim/vi to open the file.
The above is how to convert bin-log log files into sql files in mysql. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.