MySQL binary logs are often used. How can I view MySQL binary logs? The following describes how to view the MySQL binary log for your reference.
MySQL binary log:
From the overview, I can see that the log-bin of my. ini configuration information does not specify the file extension, because it is not used even if you specify the extension. When mysql creates a binary log file, it first creates a file named "mysql_log_bin" and named ". index, and create a file named "mysql_log_bin" with the suffix ". 000001. When the mysql service is restarted once, A file with a suffix of 000001 is added, and the suffix name is incremented by 1. If the log length exceeds the upper limit of max_binlog_size, the default value is 1 GB.) A new log file is created; use the flush logsmysql command) or execute the mysqladmin-u-p flush-logswindows command prompt) to create a new log file.
Since MySQL binary data is written, normal data cannot be seen when you open a file in Notepad. How can we view it?
Use the mysqlbinlog command in the BIN directory, for example:
Bin> mysqlbinlog d:/mysql_log/mysql_bin.000001
Bin> mysqlbinlog d:/mysql_log/mysql_bin.000002
Bin> mysqlbinlog d:/mysql_log/mysql_bin.000003
Bin> mysqlbinlog d:/mysql_log/mysql_bin.000004
Bin> mysqlbinlog d:/mysql_log/mysql_bin.000005
You can also use SQL statements to view the binary file directory created by mysql:
Mysql> show master logs; view the current binary file status:
Mysql> show master status;
Mysql bin log files clear sh instances
How to use the new MySQL Update log
How to relocate the MySQL DATA DIRECTORY
MySQL database table Representation
How to change the MySQL Data File Path