I have a Percona MySQL DB running on a dedicated server.

I have in my.cnf


My issue is that the log file mysql-bin.000001 is ever growing in size.

I'm not sure if the expected behaviour is for it to start a new file each day on 7 day rotation, or to "trim from the top", but it doesn't seem to be doing either, as it's the only file been created and continues to grow in size beyond the 7 day boundary.

Any advice or clarification is much appreciated.

  • Who is voting for this to be closed without telling me what's wrong with my question?!
    – i-CONICA
    Commented Jan 7, 2015 at 16:45
  • People are voting to migrate it to DBA. Would you prefer I not vote that way? I haven't voted yet.... Commented Jan 7, 2015 at 20:34
  • 1
    Hi, Katherine. I didn't realise it was voting to be migrated. It simply said "close (2)" at the time. I thought serverfault was a good place for the question, but obviously DBA is a more specific place. :)
    – i-CONICA
    Commented Jan 8, 2015 at 9:00

1 Answer 1


If the file hasn't exceeded max_binlog_size or if a log flushing event hasn't occurred then it won't start a new file. expire_logs_days only removes non-active binary logs (i.e. files other than the one that shows up under a "show master status;").

  • Ok thank you. So the expire_logs_days will only consider currently unused log files, but mine will never be unused as there's no max_binlog_size parameter. I didn't realise there was a dependency on this other parameter. I'll add it, thanks again.
    – i-CONICA
    Commented Jan 8, 2015 at 9:02
  • If you don't set max_binlog_size in your my.cnf it will be the default which is 1GB.
    – HTTP500
    Commented Jan 8, 2015 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.