1

I got task to configure I think some sort of monster. My boss want to have two mysql servers. Let's say serverA and serverB have databases db1,db2,db3,db4. He wanted that serverA will be master for only databases db1 and db2, and thise databases will be replicated to serverB, and serverB will be master for databases db3 and db4 and thise databases will be replicated to serverA.

From that description it looks like it could be possible with filtered replication(filtering using binlog-do-db and binlog-ignore-db commands).

I'm a little bit sceptic even if it possible.

So my question is it possible and if it is should I configure production servers in that way(and why not)?

B14D3
  • 5,110
  • 13
  • 58
  • 82
  • What do you mean by filter? As I read your description, he wants you to set up two databases in master-master, and simply use one as the master for 2 dbs, the other for the other 2. What are you trying to filter? –  Aug 18 '15 at 20:20
  • These type of replication is named filtered replication, I'm refering to these post https://www.percona.com/blog/2007/11/07/filtered-mysql-replication/ – B14D3 Aug 18 '15 at 20:22
  • If serverA is the master for db1 and db2, then serverB filters those and vice versa, what exactly are you replicating? You'll be downloading binlogs and doing nothing (mysql schema would still be replicating, but nothing else according to your description). Filtering has nothing whatsoever to do with who is a master and who isn't. –  Aug 18 '15 at 21:29
  • While you're at it, read [Why MySQL’s binlog-do-db option is dangerous](https://www.percona.com/blog/2009/05/14/why-mysqls-binlog-do-db-option-is-dangerous/). As banyek mentioned GTIDs fixes those problems, but you need to be on on the 5.6 series to use them. –  Aug 18 '15 at 21:35

1 Answers1

0

As long as you don't use GTID's this is possible.

banyek
  • 379
  • 1
  • 10