How to Set / Change / Configure MySQL Replication / Binary Log Format

You can select the binary logging format explicitly by starting the MySQL server with --binlog-format=type. The supported values for type are:
  • STATEMENT causes logging to be statement based.
  • ROW causes logging to be row based.
  • MIXED causes logging to use mixed format.
Prior to MySQL 5.7.7, statement-based logging format was the default. In MySQL 5.7.7 and later, row-based logging format is the default.
The logging format also can be switched at runtime. To specify the format globally for all clients, set the global value of the binlog_formatsystem variable:
mysql> SET GLOBAL binlog_format = 'STATEMENT'; mysql> SET GLOBAL binlog_format = 'ROW'; mysql> SET GLOBAL binlog_format = 'MIXED';
An individual client can control the logging format for its own statements by setting the session value of binlog_format:
mysql> SET SESSION binlog_format = 'STATEMENT';
mysql> SET SESSION binlog_format = 'ROW';
mysql> SET SESSION binlog_format = 'MIXED';

Featured Post

Lisbon <b>Affiliate</b> Conference 2018 day two recap