I just install XAMP in my mac and I'm trying to learn by my own, with books, tutorials and you guys. I'm working in the backup part and I saw I have only a LOG "mysql-bin.000001' :

  • What happen when this logs is full??.
  • Will Mysql create another one by it self??.
  • Is it possible to have 3 logs and they will delete by itself when the last one is full, like Oracle db does ?.
  • What are the cons to have more than one log (beside more space)???.
  • I guess that the Engine doesn't matter, right?
  • thanks for the answer, but what about if I want to add more logs???, if it's automatically, how many logs will be created?, THANKS
    – jcho360
    Commented Apr 23, 2012 at 15:21

1 Answer 1


The mysqld process will rotate to the next log by itself when the current binary log reaches 1G (default is 1G, but you can change that by setting max_binlog_size).

Unless you set the expire_logs_days option (By default, it is 0), no logs will disappear.

Keep in mind that restarting mysql also causes log rotations.

If you want to delete logs manually, DO NOT DELETE THEM IN THE OS.

Please use this command : PURGE BINARY LOGS TO 'mysql-bin.000200';

All logs before mysql-bin.000200 will be deleted.

You could also delete logs by timestamp: PURGE BINARY LOGS BEFORE '2012-04-19 00:00:00';

There are no other drawbacks other than wasted diskspace, especiall if the logs have outlived their usefulness.

Storage Engine usage in independent of Binary Logging. DDL for MyISAM and InnoDB can both recorded in the binary logs.

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.