1 to see which binlog
show binary logs;
show master logs;
2 , how to view the contents of log_bin
show binlog events;
View first binlog content to see what content.
3 , view the contents of a specific designated binlog log
show binlog events in 'mysql-bin.000002';
show binlog events in 'mysql-bin.000003';
4 , view binlog log file is currently being written
Because usually when a master-slave configuration, only need to use binlog log
show master status;
5 , to see whether to open the log file binlog
show variables like 'log_bin';
select @@log_bin
6 , view logs and binlog name
show variables like '%log_bin%';
7 , a log file restart
flush logs;
Restart mysql, it will produce a new bin log log.
Source: Association of operation and maintenance - View the mysql bin-log log