By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,784 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,784 IT Pros & Developers. It's quick & easy.

Questions on replication?

P: n/a
Hello,
I am very new to MySQL and just got done reading the replication
chapter in my reference manual. I kinda understand but I still don't
know if my scenario is going to work out. Here is my scenario.

I have 2 servers, A and B. A is the primary server and master in mysql.

B is the redundant server and the slave in mysql. A is replicating to
B. Now A fails and B becomes the primary server (still slave in
mysql?). A finally comes back up, but instead of switch primary status
from B back to A, A becomes the redundant server and B stays as
primary. Now, I need B to be master in mysql and A to be slave in
mysql.
I don't know if this can be done the way it needs to. If it can I
really don't need a step by step process unless someone is really
willing to give that to me. I just would like to know if this can be or

has been done.
Thanks in advance
Leon

Feb 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
subaruwrx88011 wrote:
Hello,
I am very new to MySQL and just got done reading the replication
chapter in my reference manual. I kinda understand but I still don't
know if my scenario is going to work out. Here is my scenario.

I have 2 servers, A and B. A is the primary server and master in mysql.

B is the redundant server and the slave in mysql. A is replicating to
B. Now A fails and B becomes the primary server (still slave in
mysql?). A finally comes back up, but instead of switch primary status
from B back to A, A becomes the redundant server and B stays as
primary. Now, I need B to be master in mysql and A to be slave in
mysql.
I don't know if this can be done the way it needs to. If it can I
really don't need a step by step process unless someone is really
willing to give that to me. I just would like to know if this can be or
has been done.


It can be done, but it involves some user intervention:

- copy the database from B to A
- make B master and A slave
- restart replication

Jonathan
Feb 25 '06 #2

P: n/a
Thanks for the reply.

How do you make B master in runtime or automatically?

When you restart the replication, do you have to restart both servers?
What goes into doing this?

Feb 27 '06 #3

P: n/a
subaruwrx88011 wrote:
Thanks for the reply.

How do you make B master in runtime or automatically?
I do this manually in runtime (only if server B is already set to do
binary logging).
When you restart the replication, do you have to restart both servers?
What goes into doing this?


If you already configured both servers to keep a binary log you will not
have to reboot the servers.

See the manual for details:
http://dev.mysql.com/doc/refman/5.0/...ion-howto.html

Steps you already configured need not be done again:

- As you already used replication server-id's are set at both servers.
- You might even have created a replication user on server B, if not you
will have to do so.

Jonathan
Feb 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.