There are six types of log files in MySQL,
Redo logs, undo logs, binary logs, errorlogs, slow Query logs, general logs, and relay logs.
Redo log
Ensure the persistence of transactions. In case there are dirty pages that have not been written to disk at the time of the failure, redo the mysql service according to the redo log to achieve transaction persistence.
Undo log undo log
Holds a version of the data prior to the transaction, can be used for rollback, and can also provide multi-version concurrency control read (MVCC), that is, unlocked read