MySQL binary logging configuration¶
MySQL binary logging configuration involves specific variables within the MySQL configuration file (typically my.ini or my.cnf) that control the size, synchronization, and format of binary logs, which are essential for data recovery and replication.^[600-developer-database-mysql-mysql8-portable.md]
Key Configuration Variables¶
binlog_row_event_max_size: Specifies the maximum size (in bytes) for row-based binary log events.^[600-developer-database-mysql-mysql8-portable.md] If possible, rows are split into events smaller than this limit, and the value should be a multiple of 256.^[600-developer-database-mysql-mysql8-portable.md]sync_master_info: Controls the frequency of synchronizing themaster.infofile to disk.^[600-developer-database-mysql-mysql8-portable.md] If set to a value greater than 0, the file is synchronized (usingfdatasync()) after everysync_master_infoevent.^[600-developer-database-mysql-mysql8-portable.md]sync_relay_log: Determines how often the relay log is synchronized to disk.^[600-developer-database-mysql-mysql8-portable.md] When set greater than 0, synchronization occurs after everysync_relay_logwrite to the relay log.^[600-developer-database-mysql-mysql8-portable.md]sync_relay_log_info: Manages the synchronization of therelay-log.infofile to disk.^[600-developer-database-mysql-mysql8-portable.md] A value greater than 0 triggers synchronization after everysync_relay_log_infotransaction.^[600-developer-database-mysql-mysql8-portable.md]
Related Concepts¶
- [[InnoDB configuration]]
- [[MySQL replication]]
- [[Data recovery]]
Sources¶
^[600-developer-database-mysql-mysql8-portable.md]