MySQL Forums
Forum List  »  Replication

Planned Switching Master To Slave
Posted by: Hans Schou
Date: November 24, 2016 02:47AM

I have a master called m1 and a slave called s1. m1 has several databases where one is called d1. s1 replicate d1.

Now I want s1 one to become master for the d1 db. Several clients are writing to m1.d1 and I want to be sure that these do not write after STOP SLAVE on s1.

What is the is the best way to prevent the clients from writing during switch-over? Can I put m1.d1 in read-only mode?

If I only had one database on m1 I would just DROP or REVOKE all users except root and repl but this is not the.

My over all plan is with a little downtime:
* m1: prevent all clients from writing to d1, s1 should still read
* s1: check SLAVE STATUS not behind master
* s1: STOP SLAVE (no one must write to m1.d1 now)
* s1: RESET MASTER
* configure all clients to write to s1.d1 instead

best regards
Hans

Options: ReplyQuote


Subject
Views
Written By
Posted
Planned Switching Master To Slave
1196
November 24, 2016 02:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.