Syntax:
SET sql_log_bin = {OFF|ON}

The sql_log_bin variable controls whether logging to the binary log is
enabled for the current session (assuming that the binary log itself is
enabled). The default value is ON. To disable or enable binary logging
for the current session, set the session sql_log_bin variable to OFF or
ON.

Set this variable to OFF for a session to temporarily disable binary
logging while making changes to the master you do not want replicated
to the slave.

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
http://dev.mysql.com/doc/refman/5.5/en/system-variable-privileges.html.

It is not possible to set the session value of sql_log_bin within a
transaction or subquery.

As of MySQL 5.5.41, the global sql_log_bin variable is read only and
cannot be modified. The global scope is deprecated and will be removed
in a future MySQL release. Prior to 5.5.41, sql_log_bin can be set as a
global or session variable. Setting sql_log_bin globally is only
detected when a new session is started. Any sessions previously running
are not impacted when setting sql_log_bin globally.

*Warning*:

Incorrect use of sql_log_bin with a global scope means any changes made
in an already running session are still being recorded to the binary
log and therefore replicated. Exercise extreme caution using
sql_log_bin with a global scope as the above situation could cause
unexpected results including replication failure.

URL: http://dev.mysql.com/doc/refman/5.5/en/set-sql-log-bin.html

