4

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!

0

1 Answer 1

6

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".

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

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