mysql教程

超轻量级php框架startmvc

mysql手动删除BINLOG的方法

更新时间:2020-04-24 02:50:01 作者:startmvc
在MySQL中执行以下命令: PURGE{MASTER|BINARY}LOGSTO‘log_name' PURGE{MASTER|BINARY}LOGSBEFORE‘date'

在MySQL中执行以下命令:


 PURGE {MASTER | BINARY} LOGS TO ‘log_name'

 PURGE {MASTER | BINARY} LOGS BEFORE ‘date'

 PURGE {MASTER|BINARY} LOGS BEFORE DATE_SUB(NOW(),INTERVAL 7 DAY);

例如:

 mysql>PURGE MASTER LOGS TO ‘mysql-bin.010′;

 mysql>PURGE MASTER LOGS BEFORE ‘2008-06-22 13:00:00′;

 mysql>PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 7 DAY);

mysql BINLOG