Replicate specific tables

You can specify the tables you want to be replicated using REPLICATE_DO_TABLE:

mysql> CHANGE REPLICATION FILTER REPLICATE_DO_TABLE = ('db1.table1'); 

Suppose that you want to use regex for tables; you can use the REPLICATE_WILD_DO_TABLE option:

mysql> CHANGE REPLICATION FILTER REPLICATE_WILD_DO_TABLE = ('db1.imp%'); 

You can mention some databases or tables with regex using various IGNORE options.

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.