In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Binlog introduction
Binlog, or binary log, records all changes on the database.
When the execution of the SQL statement that changes the database ends, a record is written at the end of the binlog, and the statement parser is informed that the statement execution is complete.
Binlog format
Based on statements, there is no guarantee that all statements are executed successfully from the slave library, such as update. Limit 1
Based on the row, record each change as a line in the binlog. When performing a particularly complex update or delete operation, a line-based format has an advantage.
Log in to mysql to view binlog
View only the contents of the first binlog file
Show binlog events
View the contents of the specified binlog file
Show binlog events in 'mysql-bin.000002'
View the binlog file currently being written
Show master status\ G
Get a list of binlog files
Show binary logs
Use the mysqlbinlog tool to view
Note:
Do not view the binlog file that is currently being written
Do not add-- force parameter to force access
If the binlog format is in line mode, add the-vv parameter
View locally
Based on start / end time
Mysqlbinlog-- start-datetime='2013-09-100 00-stop-datetime='2013-09-10-01-10-01-01-01-01-01-d library name binary file
Based on posvalue
Mysqlbinlog-- start-postion=107-- stop-position=1000-d library name binary file
Remote view
Specify the start / end time and redirect the results to the local t.binlog file.
Mysqlbinlog-u username-p password-hl-db1.dba.beta.cn6.qunar.com-P3306\-- read-from-remote-server-- start-datetime='2013-09-10 23 password 00'-- stop-datetime='2013-09-10 23
Summary
The above is a detailed explanation of the method of viewing Mysql Binlog data introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me, and the editor will reply to you in time. Thank you very much for your support to the website!
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.