Replicate a database only

Assume that you want to replicate db1 and db2 only. Use the following statement to create the replication filter.

mysql> CHANGE REPLICATION FILTER REPLICATE_DO_DB = (db1, db2);

Note that you should specify all the databases inside parentheses.

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.