This is a simple article with an examples for “how to configure
replication filters for channel”
Starting from MySQL 8.0 replication filters can be global or
channel-specific, enabling you to configure multi-source replicas
with replication filters on specific replication channels.
Channel specific replication filters are particularly useful in a
multi-source replication topology when the identical database or
table is present on multiple sources, and the replica is only
required to replicate it from one source.
Example:
CHANGE REPLICATION FILTER REPLICATE_DO_DB =(test,test3,test4 ), REPLICATE_REWRITE_DB = ((test1,test3),(test2,test4)) FOR CHANNEL "node1";
my.cnf confiration to make replication filter setting persistent:
replicate-do-db=node1:test
replicate-do-db=node1:test3
replicate-do-db=node1:test4
replicate-rewrite-db=node1:test1->test3 …
[Read more]