查看二进制日志文件
mysql> SHOW BINLOG EVENTS \G;
mysql> SHOW MASTER LOGS;
清除二进制日志文件
mysql> PURGE { MASTER|BINARY } LOGS TO 'log_name';
mysql> PURGE { MASTER|BINARY } LOGS BEFORE 'datetime';
例如:
mysql> PURGE MASTER LOGS TO 'mysql-bin.000001';
mysql> PURGE MASTER LOGS BEFORE '2009-12-20 13:00:00';
另一种清除二进制日志方法
mysql > flush logs;
mysql > reset master;