mysql手动删除BINLOG的方法

有运维或运维开发方面的需求,可以联系博主QQ 452336092或Email:admin#centos.bz(收费)

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

原文出处:teakki -> https://www.teakki.com/p/57e22e2aa16367940da64180

打赏

如果此文对你有所帮助,请随意打赏鼓励作者^_^