当前位置:Gxlcms > mysql > mysql手动删除BINLOG的方法_MySQL

mysql手动删除BINLOG的方法_MySQL

时间:2021-07-01 10:21:17 帮助过:17人阅读

bitsCN.com

在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);

bitsCN.com

人气教程排行