There are options to dynamically set variables on replication slaves, like replicate_wild_do_table and replicate_wild_ignore_table. But, are there any options for replication master to dynamically set database names which begin with same prefix, and not repeating:





in my.cnf.


Dynamically, no.

You could, however, write a SELECT against information_schema.TABLES to create the replicate-do-db list for subsequent manual (or programmatic) placement into the config file.

Are you really adding more databases frequently?

Would it be better to, instead, do replicate-ignore-db on the rest of the dbs?

Also, consider using binlog-... so that the filtering is done sooner (on the Master instead of on the Slave). (Yes, there are valid reasons to delay the filtering until the Slave.)

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.