Master Server contains db1
Slave Server contains db1 and db2
Slave Server needs db1 from the Master to replicate to db2
On my.cnf on the slave server:
Thus, this situation would dictate the following:
What if the Master Server contained db1 and db2; and
the Slave needs only db1 from the Master to replicate to db2 on the Slave?
We don't want to replicate both db1 and db2 to this slave, although we want to replicate both databases to another slave - this means that the filter for databases should reside on my.cnf on the slave...
Assuming that we are using replicate-rewrite-db=db1->db2:
Using replicate-do-db on the my.cnf file on the slave, which database would you use with that command?
db1 or db2? It only takes a moment in time to find out... :)