Replication and Binary Logging Options and Variables MIXED This system variable sets the binary logging format, and can be any one of  STATEMENT ,  ROW , or  MIXED . See Section 17.2.1, “Replication Formats” . The setting takes effect when binary logging is enabled on the server, which is the case when the  log_bin  system variable is set to  ON . From MySQL 8.0, binary logging is enabled by default. binlog_format  can be set at startup or at runtime, except that under some conditions, changing this variable at runtime is not possible or causes replication to fail, as described later. The default is  ROW .  Exception : In NDB Cluster, the default is  MIXED ; statement-based replication is not supported for NDB Cluster. Setting the session value of this system variable is a restricted operation. The session user must have privileges sufficient to set restricted session variables. See Section 5.1.9.1, “System Variable Privileges” . The rules governing when changes to this variable take effect and how long the effect lasts are the same as for other MySQL server system variables. For more information, see Section 13.7.6.1, “SET Syntax for Variable Assignment” . When  MIXED  is specified, statement-based replication is used, except for cases where only row-based replication is guaranteed to lead to proper results. For example, this happens when statements contain loadable functions or the  UUID()  function. For details of how stored programs (stored procedures and functions, triggers, and events) are handled when each binary logging format is set, see Section 25.7, “Stored Program Binary Logging” . There are exceptions when you cannot switch the replication format at runtime: Trying to switch the replication format in any of these cases (or attempting to set the current replication format) results in an error. You can, however, use  PERSIST_ONLY  ( SET @@PERSIST_ONLY.binlog_format ) to change the replication format at any time, because this action does not modify the runtime global system variable value, and takes effect only after a server restart. Switching the replication format at runtime is not recommended when any temporary tables exist, because temporary tables are logged only when using statement-based replication, whereas with row- based replication and mixed replication, they are not logged. Changing the logging format on a replication source server does not cause a replica to change its logging format to match. Switching the replication format while replication is ongoing can cause issues if a replica has binary logging enabled, and the change results in the replica using  STATEMENT  format logging while the source is using  ROW  or  MIXED  format logging. A replica is not able to convert binary log entries received in  ROW  logging format to  STATEMENT  format for use in its own binary log, so this 3551 •The replication format cannot be changed from within a stored function or a trigger. •If a session has open temporary tables, the replication format cannot be changed for the session ( SET @@SESSION.binlog_format ). •If any replication channel has open temporary tables, the replication format cannot be changed globally ( SET @@GLOBAL.binlog_format  or  SET @@PERSIST.binlog_format ). •If any replication channel applier thread is currently running, the replication format cannot be changed globally ( SET @@GLOBAL.binlog_format  or  SET @@PERSIST.binlog_format ).