- 查看当前日志记录
mysql> show binary logs; +—————-+———–+ | Log_name | File_size | +—————-+———–+ | mysql-bin.000001 | 150462942 | | mysql-bin.000002 | 125 | | mysql-bin.000003 | 106 | +—————-+———–+
- 删除bin-log(删除mysql-bin.000003之前的而没有包含mysql-bin.000003)
mysql> purge binary logs to ‘mysql-bin.000003′; Query OK, 0 rows affected (0.16 sec)