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
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; + can view 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 Binlog open and view under Window