I'm thinking that the first article of mine should be MySQL MHA, as I was just looking for something nice of how to automate mysql master failover.
A primary objective of MHA is automating master failover and slave promotion within short (usually 10-30 seconds) downtime, without suffering from replication consistency problems, without spending money for lots of new servers, without performance penalty, without complexity (easy-to-install), and without changing existing deployments.
The official project is here, MySQL MHA.
Before installing MySQL MHA, you need to install mysql server and enable replication between master and slave database server.
- MHA Nodes & Manager
|DB(Master) + MHA Manager||192.168.100.200(ha-mgr01)|
|DB(Slave) + MHA Node||192.168.100.197(ha-db01)|
|DB(Slave) + MHA Node||192.168.100.198(ha-db02)|
*Make sure that you need to setup public key authentication to login as root user between those hosts without passphrase.
- Installing MHA Node
- Installing MHA Manager