View mysqlbinlog version Check the binlog log opening status After MySQL opens the bin-log log, non-query operations of the MySQL database will save records in the bin-log file. Generally, bin-log log files cannot be opened for viewing and require the use of mysql tools. Assume that the binary file mysql-bin.000011 is stored in the /mysql/data/ directory. You need to export the SQL statements about the database tide in the log file mysql-bin.000011 to the file tide.sql. Perform the following operations: // Export the SQL statements about the tide database from the binlog file 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 // Parse the row-format binlog log file into a base64 file. -v represents line break display. 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. Summarize The above is the method that the editor introduced to you how to convert MySQL bin-log log files into sql files. I hope it will be helpful to you! You may also be interested in:
|
<<: Sample code for implementing PC resolution adaptation in Vue
>>: VScode Remote SSH remote editing and debugging code
Table of contents MySQL's current_timestamp p...
Table of contents The role of foreign keys mysql ...
Table of contents Create a new user Authorize new...
I have been working on a project recently - Budou...
1. CPU utilization sar -p (view all day) sar -u 1...
The test environment of this experiment: Windows ...
1. Problem The project developed using Eclipse on...
Table of contents 1. What does shallow copy mean?...
Introduction to Debian Debian in a broad sense re...
Two cases: 1. With index 2. Without index Prerequ...
1. First enter the server's mysql to modify p...
I've been using Bootstrap to develop a websit...
There is another tree structure Javascript object...
1. Create a new rabbitmq in the /etc/init.d direc...
For several reasons (including curiosity), I star...