移除binlog之前的binlog
PURGE BINARY LOGS TO 'binlog名字';
EX:移除mysql-bin.010前的binlog,會移除mysql-bin.001-mysql-bin.009
mysql> PURGE BINARY LOGS TO 'mysql-bin.010';
移除某個時間點前的binlog
mysql> PURGE BINARY LOGS BEFORE '2008-04-02 22:46:26';
若下以上指令,無法刪除bin-log,檢查mysql-bin.index裡的內容是否和實體檔mysql-bin.xxx相同。若不同可建空的mysql-bin.xxx檔,再執行以上的語法。
沒有留言:
張貼留言