In mysql with innodb, there are two types of logs: binary log and transaction log. I know transaction log is specific to innodb. But when comes to replication, backup and crash recover, what roles each of them play and what is the different?

Thank you!


The binlog is a history of the writes to the database. It is vital for replication. It can also be used in certain "incremental" backup techniques.

The transaction log (usually in files iblog1 and iblog2) is vital to InnoDB for multiple reasons: ROLLBACK, crash recovery, and possibly more.

Manual page about binlog non-InnoDB logs

Redo log

There are lots of web pages discussing these files from various viewpoints.

There are many ways to do "backup".

  • so does not that mean without transaction log, e.g. myisam engine, it cannot gracefully recover from crash? – Alfred Apr 17 '15 at 20:42
  • Correct. Often, after a crash, MyISAM tables need a REPAIR. – Rick James Apr 17 '15 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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