0

I have been playing with MySQL replication for a new project of mine.
I am using row based replication.
I have a particular confusion with replicate_do_db which is to be written in the my.cnf of the slave to filter the databases which need to be replicated on the slave.
There is no binlog_do_db on the master i.e. the master is logging every change for every database. The master has the following databases :

  1. db1
  2. db2

My replication is setup to replicate_do_db=db2 to replicate only 1 DB.

My confusion is : Lets say if db1 on the master would have writes of 30GB/day, would this 30GB of new data also be sent to the slave and the slave would then filter it ? Or would the slave just ask the data of db2 only and not transfer any data of db1 to the slave ?

1 Answer 1

0

Unfortunately MySQL only creates one binary log for all databases that are running in the instance so the slave will transfer the entire binary log and then filter which statements it runs based on the replication-do statements. You can get around this by running multiple instances of MySQL for the two different databases but that has its own drawbacks and complications.

1
  • Will tungsten replicator or Galera cluster have this same issue ? Feb 2, 2016 at 6:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .