欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql手动删除BINLOG的方法_MySQL

程序员文章站 2022-05-19 20:32:23
...
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
相关标签: mysql