Multi-Source Replication is one of the awesome features in MySQL 5.7 which allows the slave to get the replication streams from multiple masters by having a replication channel for each master.
But what about the replication filters? Can we set replication filters per channel in the multi-source replication?
In brief, replication filtering is a way used to eliminate part of the master’s events (not) to be replicated to the slaves (Also known as Partial Replication). This can be done on either master (using
--binlog-ignore-db options) or slaves (using
--replicate-* options) while it is not recommended on the master anyway at least to provide Point in Time Recovery (PiTR).
Worth mentioning here that changing the replication filters online is yet another very nice improvement in MySQL 5.7 as well in which we have to stop only the
SLAVE SQL_THREAD – instead of restarting MySQL service – to change the replication filters by using “
CHANGE REPLICATION FILTER” statement. Continue reading