Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 33.3Mb
PDF (A4) - 33.3Mb
PDF (RPM) - 31.3Mb
HTML Download (TGZ) - 7.9Mb
HTML Download (Zip) - 8.0Mb
HTML Download (RPM) - 6.8Mb
Man Pages (TGZ) - 144.9Kb
Man Pages (Zip) - 205.9Kb
Info (Gzip) - 3.0Mb
Info (Zip) - 3.0Mb


Pre-General Availability Draft: 2017-09-21

13.4.1.3 SET sql_log_bin Syntax

SET sql_log_bin = {0|1}

The sql_log_bin variable controls whether logging to the binary log is done. The default value is 1 (do logging). To change logging for the current session, change the session value of this variable. The session user must have the SYSTEM_VARIABLES_ADMIN or SUPER privilege to set this variable. Set this variable to 0 for a session to temporarily disable binary logging while making changes to the master which you do not want to replicate to the slave.

Prior to MySQL 8.0.3, the global sql_log_bin variable is read only and cannot be modified. As of MySQL 8.0.3, the global scope for sql_log_bin is removed, and sql_log_bin has session scope only. Applications that rely on accessing @@global.sql_log_bin should be adjusted.

It is not possible to set @@session.sql_log_bin within a transaction or subquery.


User Comments
Sign Up Login You must be logged in to post a comment.