Quantcast
Channel: MySQL Forums - Replication
Viewing all articles
Browse latest Browse all 1562

Planned Switching Master To Slave (no replies)

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

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>