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