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

posted @ 2015-10-06 22:34  雍洲无名  阅读(312)  评论(0编辑  收藏  举报