|
前陣子發現 mysql 資料庫內有數個檔案異常肥大! 檔名是 xxx-bin.000001~4 這是 mysql 的 二元 log 檔. 要刪除它可別直接 rm. 而是得透過 mysql 的刪除機制刪除比較妥當. 搜尋了一下 Google. 得到刪除的方法! 1. mysql> show master logs;-> 顯現目前的 log 檔有哪些。 2. PURGE { MASTER|BINARY } LOGS TO ‘log_name’ -> 要把現在記錄的 log 丟到那個檔案名稱。 3. PURGE { MASTER|BINARY } LOGS BEFORE ‘date’ -> 要從那個日期之前。 Post a comment
|