Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

MySQL binary log files take all of my disk space

Answer:

If you have enabled binary log in your MySQL server, most likely you are using the replication feature. You don't need to keep the binary log forever, so in the my.cnf, add the line

expire_logs_days = 10

So your MySQL server (master) would keep at most binary log for 10 days. (Notes: you might need to adjust this value, make sure your MySQL slave is able to catch up the updates within 10 days)

However, if you are not using replication, you can consider disable the binary log, e.g. edit the my.cnf, comment out the "log-bin"

# log-bin

  1. Auto remove expired binary log in MySQL
  2. What are the difference between CHAR BINARY and BINARY type in MySQL
  3. Enable MySQL binary log (bin log)
  4. Updated the Slave binary log if the updates are received from a MySQL master
  5. Setting the MySQL’s Binary Log Format

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>