Questions on replication?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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

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

Re: Questions on replication?

subaruwrx88011 wrote:
Quoted text here. Click to load it

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


Re: Questions on replication?

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?

Re: Questions on replication?

subaruwrx88011 wrote:
Quoted text here. Click to load it

I do this manually in runtime (only if server B is already set to do
binary logging).

Quoted text here. Click to load it

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

See the manual for details:

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.


Site Timeline