In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 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 illegal operations of the mysql binlog log". In the daily operation, I believe that many people have doubts about the illegal operation of the mysql binlog log. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "what are the illegal operations of the mysql binlog log?" Next, please follow the editor to study!
Case: customer database, a key configuration table has been modified, need to find operation records and operation time
1:mysqlbinlog read
If the binlog format=statement can be viewed directly through mysqlbinlog, if the binlog format=row needs to add-vv-- base64-output=decode-rows/usr/local/mysql/bin/mysqlbinlog-- no-defaults-vv-- base64-output=decode-rows/usr/local/mysql/ data/mysql-bin.000067-d sakila-- start-datetime='2018-07-04 16 dsw20180704/usr/ 30-stop-datetime='2018 00'-- stop-datetime='2018-07-04-16 stop-datetime='2018-- s-r dsw20180704/usr/ Local/mysql/bin/mysqlbinlog-- no-defaults-vv-- base64-output=decode-rows / home/mysql/data/db_ngcrmpf/blog/mysql-bin.000007-d huahua-- start-datetime='2018-09-10 17vv 00V 00'-- stop-datetime='2018-09-10 19V 12V 00'-r dsw0007 Note:-s will delete some information. It is recommended to remove
2:show binlog
Show binlog events in 'mysql-bin.000067'
Special instructions:
Sometimes we want to track a database operation record, such as to find out who manipulated a table (such as who changed the field name). Binary log records operation records, thread numbers and other information, but does not record user information, so it needs to be combined with init-connect to achieve tracking. Init-connect, during the initialization phase of each connection, record the user of the connection, and connection_id information.
Operation steps
1. Cp binlog2, mysqlbinlog3, cat dsw.1006 | grep interface
New skills of get
Find the files containing matching characters under the current directory and its subdirectories, find the subdirectories, and output the line number after matching, where the dot represents the current directory grep-nr oracle. At this point, the study of "what are the illegal operations of the mysql binlog 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.