mysql資料庫bin-log日誌管理
阿新 • • 發佈:2020-12-15
獲取binlog檔案列表 show binary logs; 手動刪除 purge master logs before '2020-10-10 17:20:00'; 刪除指定日期以前的日誌索引中binlog日誌檔案 purge master logs to'mysql-bin.000022'; 刪除指定日誌檔案的日誌索引中binlog日誌檔案 自動刪除 set global expire_logs_days = 7; 設定binlog多少天過期 臨時設定 expire_logs_days=0 二進位制日誌自動刪除的天數。預設值為0,表示“沒有自動刪除” 永久設定