Binary Logs for MariaDB Enterprise Server
MariaDB Enterprise Server writes statements and transactions to its binary logs.
Reference material is available for MariaDB Enterprise Server.
The binary logs are intended for:
The binary log uses a binary format. The mariadb-binlog utility is capable of displaying the contents in a human-readable format.
The binary log supports row-based logging, statement-based logging, and a mixed mode. In the mixed mode, most statements are logged in statement-based format, while some "unsafe" statements are written in row-based format.
The binary log format is configured by the binlog_format system variable:
[mariadb] log_bin = mariadb-bin binlog_format = ROW
By default, binary logging is disabled.
You can determine the binary log's file name and location by querying the log_bin_basename system variable:
SHOW GLOBAL VARIABLES LIKE 'log_bin_basename';
Several aspects of the binary log are configurable.
Configure the Path
The path to the binary logs is configured by the log_bin option.
The option can be set in a configuration file:
The binary logs will be created in the data directory defined by the datadir system variable.
The binary logs can be placed outside of the data directory by setting the log_bin option to the absolute path of the desired location:
If the log_bin option is set, but no value is provided, the prefix for the binary logs is set to
HOSTNAME is the system's host name:
[mariadb] # base name on the system's host name log_bin
Configure the Format
The format used for the binary log is configured by the binlog_format system variable.
The system variable can be set in a configuration file:
Binary Logs by MariaDB Server Version
Choose a version of MariaDB Enterprise Server to see the binary logs supported by that version:
Choose a version of MariaDB Community Server to see the binary logs supported by that version: