OK, I've got this setup:
s1-dABC (master, server1 database's A, B, & C) -> s2-dABC & s3-dABC (slaves)
s4-dXY (master, server3 database's X & Y) -> s5-dXY (slave)
What I want is this (interim step):
s1-dABCX (master) -> s2-dABCX & s3-dABCX (slaves)
s4-dY (master) -> s5-dY (slave)
This is the desired end configuration:
s1-dABCXY (master) -> s2-dABCXY & s3-dABCXY (slaves)
s4 & s5 taken out of service.
I'd like to move database X with no down-time if possible, and it sure *looks like* I could use replication to do this. Here's what I think I'd need to do:
1) mysqldump server4 database X with --master-data option.
2) Import database X into server1.
3) On server1, issue CHANGE MASTER TO and START SLAVE. (S1 is a master, but now becomes a slave to s4 as well just for the X database...correct?). It should start replicating from s4dX and catch up any missed txn's.
4) Once s1dX is caught up with s4dX, switch the app to hit s1dX instead of s4dX.
5) On server1, issue STOP SLAVE.
6) Drop s4dX (after I'm sure everything's working correctly).
Will this work? Is there anything I'm missing?
If it's simpler, I can move both database X and database Y from server4-5 at the same time. (I suspect it might be easiest to just move both...then I won't have to setup any ignore flags in the my.cnf files...right?) They both need to be on server1-3 in the end.
Also, server1-3 is on MySQL5.0.45, server4-5 is on MySQL5.0.77...will this work with these versions?
TIA!
Dave
s1-dABC (master, server1 database's A, B, & C) -> s2-dABC & s3-dABC (slaves)
s4-dXY (master, server3 database's X & Y) -> s5-dXY (slave)
What I want is this (interim step):
s1-dABCX (master) -> s2-dABCX & s3-dABCX (slaves)
s4-dY (master) -> s5-dY (slave)
This is the desired end configuration:
s1-dABCXY (master) -> s2-dABCXY & s3-dABCXY (slaves)
s4 & s5 taken out of service.
I'd like to move database X with no down-time if possible, and it sure *looks like* I could use replication to do this. Here's what I think I'd need to do:
1) mysqldump server4 database X with --master-data option.
2) Import database X into server1.
3) On server1, issue CHANGE MASTER TO and START SLAVE. (S1 is a master, but now becomes a slave to s4 as well just for the X database...correct?). It should start replicating from s4dX and catch up any missed txn's.
4) Once s1dX is caught up with s4dX, switch the app to hit s1dX instead of s4dX.
5) On server1, issue STOP SLAVE.
6) Drop s4dX (after I'm sure everything's working correctly).
Will this work? Is there anything I'm missing?
If it's simpler, I can move both database X and database Y from server4-5 at the same time. (I suspect it might be easiest to just move both...then I won't have to setup any ignore flags in the my.cnf files...right?) They both need to be on server1-3 in the end.
Also, server1-3 is on MySQL5.0.45, server4-5 is on MySQL5.0.77...will this work with these versions?
TIA!
Dave