Remove MySQL old bin log

Vote 0 Votes

MySQL 若有用 Replication 的話, 會持續有 bin log 產生, 舊的 bin log 若用不到了可以刪除之
find /var/lib/mysql -mtime +2 -name "*-bin.0*" -exec rm -f {} \;
刪除超過三天的 bin log

比較正規的方式是在 定義 expire_logs_days,
然後用 mysqladmin flush-logs

Leave a comment

About this Entry

This page contains a single entry by Pank published on October 15, 2010 7:29 AM.

Rdesc was the previous entry in this blog.

Change user home dir initial permission is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.