Can a ClustrixDB Slave be configured to include/exclude databases in the replication stream?

Ryan Lecha -

Yes. You can choose which DBs will be replicated coming through the replication stream by using the mysql_default_db_replication_policy variable as well as the mysql_db_replication_policy table:

sql> show create table system.mysql_db_replication_policy\G
*************************** 1. row ***************************
       Table: mysql_db_replication_policy
Create Table: CREATE TABLE `mysql_db_replication_policy` (
  `dbname` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci /*$ legacy */ not null,
  `allow` boolean not null,
  PRIMARY KEY (`dbname`) /*$ DISTRIBUTE=1 */
) CHARACTER SET utf8 COLLATE utf8_general_ci /*$ REPLICAS=2 SLICES=3 */
1 row in set (0.02 sec)

Setting the mysql_default_db_replication_policy variable to TRUE means that any values added into the system.mysql_db_replication_policy table will be ignored. Setting the policy to FALSE means that ONLY databases in the system.mysql_db_replication_policy table will be replicated.

Have more questions? Submit a request


Please sign in to leave a comment.
Powered by Zendesk