Mysql-MHA高可用实验测试
说明:centos6.5mysql5.5.37mha4mysql-manager-0.55mha4mysql-node-0.54manager192.168.1.1db1192.168.1.2db2192.168.1.3db3192.168.1.4配置mysql主从db1:server
说明:
centos 6.5 mysql 5.5.37 mha4mysql-manager-0.55 mha4mysql-node-0.54
manager 192.168.1.1
db1 192.168.1.2
db2 192.168.1.3
db3 192.168.1.4
配置mysql主从
db1:
server-id = 1
read_only = 1
relay_log_purge=0
binlog_format=mixed
db2,db3忽略
db1主
db2备
db3从
配置双机互信
manager
db1主
db2备 和 db3从 配置略
安装mysql-MHA
https://downloads.mariadb.com/files/MHA
db1主 db2备 db3从
yum install perl-DBD-MySQL
yum localinstall mha4mysql-node-0.54-0.el6.noarch.rpm
manager
#这两个yum没有安装上 perl-Log-Dispatch perl-Parallel-ForkManager
rpm -ivh perl-Mail-Sender-0.8.16-1.el6.rf.noarch.rpm
rpm -ivh perl-Mail-Sendmail-0.79-1.2.el6.rf.noarch.rpm
yum localinstall perl-Log-Dispatch-2.27-1.el6.noarch.rpm
yum localinstall perl-Parallel-ForkManager-0.7.5-2.2.el6.rf.noarch.rpm
yum localinstall mha4mysql-node-0.54-0.el6.noarch.rpm
yum localinstall mha4mysql-manager-0.55-0.el6.noarch.rpm
配置mysql-MHA
[root@manager ~]# masterha_
masterha_check_repl masterha_conf_host masterha_master_switch
masterha_check_ssh masterha_manager masterha_secondary_check
masterha_check_status masterha_master_monitor masterha_stop
tar -xzf mha4mysql-manager-0.55.tar.gz
ls mha4mysql-manager-0.55/samples/conf
masterha_default.cnf app1.cnf
mkdir -p /usr/local/mha/scripts
cp mha4mysql-manager-0.55/samples/scripts/* /usr/local/mha/scripts
#验证ssh通讯
masterha_check_ssh --conf=/usr/local/mha/mha.conf
推荐阅读
-
MySQL + KeepAlived + LVS单点写入主主同步高可用架构实验_MySQL
-
DB2+HADR+TSA高可用性测试--TSA环境配置_PHP教程
-
Mysql测试二:DRBD+Mysql 高可用方案设置测试
-
MySQL的MMM高可用架构测试_MySQL
-
DB2+HADR+TSA高可用性测试--DB2HAICU配置TSA实现故障自动切换_PHP教程
-
LVS+Keepalived构建高可用负载均衡(测试篇)
-
MySQL高可用之MGR安装测试
-
MySQL高可用之MGR安装测试(续)
-
CYQ.Data 对于分布式缓存Redis、MemCache高可用的改进及性能测试
-
MySQL高可用之MHA切换测试