Binary Log

Understand the binary log in MariaDB Server. This section explains its role in replication and point-in-time recovery, detailing its format, management, and use for data integrity.

The binary log (binlog) contains a record of all changes to the databases.

Introduction to the purpose and structure of the binary log, explaining how it records data changes (DML) and structure changes (DDL) for replication and recovery.

Instructions for enabling the binary log using the --log-bin option and configuring the log file basename and index file.

Detailed comparison of the three binary logging formats: Statement-based (SBR), Row-based (RBR), and Mixed, including their pros, cons, and configuration via binlog_format.

Guide to using the log_bin_compress system variable to compress binary log events, reducing storage usage and network bandwidth during replication.

Explains how to use the Flashback feature (via mysqlbinlog --flashback) to rollback transactions by reversing the binary log events, useful for recovering from accidental data modifications.

Describes the group commit optimization, which improves performance by committing multiple transactions to the binary log in a single disk I/O operation.

Overview of the relay log, a set of log files created by a replica server to store events received from the primary's binary log before executing them.

Complete binary log maintenance: PURGE BINARY LOGS/RESET MASTER, expire_logs_days & binlog_expire_logs_seconds, FLUSH BINARY LOGS, and SHOW SLAVE STATUS.

Last updated

Was this helpful?