Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Choosing a binary log format


Choosing a binary log format is very important. The replication format can greatly be affected by this choice. Also, if the STATEMENT format is used, the developers should be aware of its important limitations.

To choose the binary log format, we can set the binlog_format variable in the configuration file or the --binlog-format startup option. If not specified, the format defaults to STATEMENT. We can also obtain the currently used format by querying the @@binlog_format server variable.

Note

The @@binlog_format variable is a dynamic variable that exists at both the global and session level. This means that it is possible to change the binary log format on the master while it is running, for all connections or only for the current connection. However, this should never be done. Changing the binary logging format on the master might cause the replication to fail, or it may cause an unexpected behavior. For this reason, changing the value of @@binlog_format, even...