Quantcast
Channel: MySQL Forums - Replication
Viewing all articles
Browse latest Browse all 1561

replicate two standalone databases to the same slave (no replies)

$
0
0
Hello all,

I would like to replicate two databases from two different instances to the same slave.

I am running a MySQL 5.5 instance with a dozen databases and we call it server A. The ibdata1 is about 6GB and we need to replicate only one database <DB1> to a new slave S1. I will utilize replicate-wild-do-table=DB1.% parameter to replicate only this DB1. I have another database DB2 from server B which I also want to replicate to the new slave S1. Here are my questions.

1. Once I setup replication, I want to rebuild this slave to reduce the ibddata1 size by rebuilding the S1 entirely. Since this S1 instance only has DB1 database, it will not take too long to rebuild and to replicate from the master. Will this work?

2. Assuming I have already cut replication tie between S1 and A. I wish to replicate another DB2 database from server B. How can I replicate from a new master instance using replicate-wild-do-table=DB2.% ? If I take a snapshot from the new master B and copy to this slave S1, it would wipe out the previous DB1 database. Is that true? If that is the case, how would I replicate a second database from another master instance?

Thank you,


benny

Viewing all articles
Browse latest Browse all 1561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>