O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Disabling binary logs for a session

There may be cases where you do not want the statements to be replicated to other servers. For that, you can use the following command to disable binary logging for that session: 

mysql> SET SQL_LOG_BIN = 0;

All the SQL statements logged after executing the previous statement are not logged to the binary log. This applies only for that session.

To enable, you can execute the following:

mysql> SET SQL_LOG_BIN = 1;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required