See if Binlog is turned on:
win+r = cmd = connect mysql=>show variables like ' log_% ';
Mysql> Show variables like ' log_% '; +---------------------------------+-------------+| Variable_name | Value |+---------------------------------+-------------+| log_bin | On | | log_bin_trust_function_creators | OFF | | log_error |. \mysql.err | | log_queries_not_using_indexes | OFF | | log_slave_updates | OFF | | log_slow_queries | On | | log_warnings | 1 |+---------------------------------+-------------+
The value that does not open log_bin is off, on after opening
Open Binlog:
Modify the MySQL configuration file My.ini (in C:\ProgramData\MySQL\MySQL Server 5.6)
Add configuration: Log-bin=log-bin=d:\appserv/mysql/log/mysql-bin.log test discovery must give full path (name free)
Restarting MySQL will add two files to the log directory mysql-bin.000001 and Mysql-bin.index
View Binlog:
win+r = cmd = connect mysql=> show binary logs; = = You can see the name of your Binlog
win+r = cmd = connect mysql=> show Binlog events; = = To view the generated Binlog
Export to a text file:
D:\appserv\mysql\bin>mysqlbinlog >d:/test.txt
Make sure you have Mysqlbinlog.exe in the bin directory. Search download
MySQL using Mysqlbinlog to view log issues
Mysqlbinlog mysql-bin.00005--startdatetime= ' time '--stopdatetime= ' time '--database=db_name | Grep-i-A 6 ' id=111 '
With grep.
Where is the binlog location for MySQL under Windows, and the version is 515
Binary files in the data directory,
Can be executed again on the MySQL command line, show variables like '%datadir% '; View data path
MySQL Binlog open and view under Window, Mysqlbinlog