Can we set Replication Filters per channel in MySQL Multi-Source Replication?
Yes, it is possible to set replication filters per channel in MySQL Multi-Source Replication. Replication filters allow you to specify which data should be replicated and which should not be replicated. This feature can be useful when you want to replicate a subset of data from a specific source and exclude certain data. In MySQL Multi-Source Replication, you can set replication filters per channel by using the REPLICATE_DO_TABLE, REPLICATE_IGNORE_TABLE, REPLICATE_DO_DB, and REPLICATE_IGNORE_DB options. These options allow you to specify which tables and databases should be replicated and which should not be replicated. For example, to replicate only certain tables from a specific source, you can use the REPLICATE_DO_TABLE option. You can specify the name of the table you want to replicate and the channel name.
1 |
CHANGE REPLICATION FILTER REPLICATE_DO_TABLE = 'mydb.mytable' FOR CHANNEL 'channel_name'; |
1 |
CHANGE REPLICATION FILTER REPLICATE_IGNORE_TABLE = 'mydb.mytable' FOR CHANNEL 'channel_name'; |
1 |
CHANGE REPLICATION FILTER REPLICATE_DO_DB = 'mydb' FOR CHANNEL 'channel_name'; |