SET sql_log_bin = 0 in RDS MYSQL 5.6 I have moved into RDS MYSQL 5.6 and now I have a problem. I have 5 read replicas and a/z master.

I am trying to alter a table and want to change a column value and also on some tables I want to add a new column. Although this operation is non blocking on MYSQL 5.6 but when it gets replicated to the slaves it causes slaves to lag for entire duration of it, I cannot afford slave lag as we are 24/7 operations.

I tried doing SET sql_log_bin = 0; to skip the query to the slave but RDS do not allow this, otherwise I could have done slave (one each) --> master approach and eventually changing on master.

Anyone has any advise how to go on about this in RDS MYSQL 5.6
What we have done in a similar scenario (using Aurora RDS for master and slaves) is to use an intermediate small EC2 instance with a standard MySQL acting as a filter. This instance is a relay-slave (secondary master) between our main master and final slaves with a configuration similar to this.

We came to this solution dued to the lack of SUPER privilege and replication configuration options in Aurora RDS: You can not set sql_log_bin or define replication filters in RDS.

The problem here is with DDL statements, they are replicated to slaves although you have replication filters by db or tables in the slave. So a possible workaround is:


Create an auxiliary schema in master.
Set a db filter in mysql.cnf of secondary master, so it only adds to its binlog changes in desired schema:
binlog-do-db=&lt;myschema&gt;
If you need to add or modify columns of one of your tables in main master, first set the auxiliary schema as default:
use auxiliary-schema;
Modify the table indirectly, like
alter table &lt;myschema&gt;.&lt;table&gt; ...


This way, DDL statements are applied in secondary master, but not stored in its binlog and therefore not send to the slaves.