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 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.

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.

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

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

