MySQL replication: temporarily disable certain SQL statements replicating to subordinates?

I want to connect and execute one (or sometimes several) SQL statements, and NOT use replicated slaves.

I do not have replicate-do or replicate-ignore configurations, so I cannot usecreate an unreplicated database for sending commands. And I know about:

set global sql_slave_skip_counter = 1

But this is a slave. I would like to be able to run a similar command on the master and have the following N commands not sent to the slaves (which, I believe, is also not logged in binlogs).

+5
source share
2 answers

SET sql_log_bin=0 - , . SUPER priv. , 1. . http://dev.mysql.com/doc/refman/5.0/en/server-session-variables.html#sysvar_sql_log_bin

SET sql_log_bin=0;
UPDATE ... ;
INSERT ... ;
DELETE ... ;
SET sql_log_bin=1 ;
+14

.....!

SET sql_log_bin=0;

Master MySQL 0 1 ( ). , 1. , , .....!

+2

All Articles