Replication监控及自动故障切换
首先在相应的机器上增加授权
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.1.108' IDENTIFIED BY 'repl';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.1.109' IDENTIFIED BY 'repl';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.168.1.110' IDENTIFIED BY 'repl';
report-host=192.168.1.110
master-info-repository=TABLE
relay-log-info-repository=TABLE
mysqlfailover --master=replm:replm@192.168.1.108 --discover-slaves-login=replm:replm --force