Replication-Manager MYSQL5.7 高可用

MySQL高可用工具,一直以来MHA使用的比较多,自从MySQL 开启GTID之后,出现了Orchestrator以及replication-manager这类新的高可用工具

 

 

 

 

1. 设置yum源

# /etc/yum.repos.d/signal18.repo
[signal18]
name=Signal18 repositories
baseurl=http://repo.signal18.io/centos/2.1/$releasever/$basearch/
gpgcheck=0
enabled=1

 

2. master 安装 yum install replication-manager-osc

yun -y install yum install replication-manager-osc

 

3. 配置文件

最小配置

[Default]
title = "ClusterTest"
db-servers-hosts = "127.0.0.1:5055,127.0.0.1:5056"    //集群节点配置,主机ip:端口,用逗号分隔
db-servers-credential = "skysql:skyvodka"             管理用户密码设置。该用户所赋予的权限 RELOAD,SUPER, REPLICATION SLAVE, REPLICATION CLIENT
replication-credential = "skysql:skyvodka"            // 该用户所给的权限 REPLICATION SLAVE, REPLICATION CLIENT
failover-mode = "manual"

Sample configuration
for package sudo cp /etc/replication-manager/etc/config.toml.sample.masterslave-haproxy /etc/replication-manager/config.toml
Sample configuration
for archive sudo cp /usr/local/replication-manager/etc/config.toml.sample.masterslave-haproxy /usr/local/replication-manager/etc/config.toml

 

[root@master ~]# vim /etc/replication-manager/config.toml

[db3306]
title = "db3306"
db-servers-hosts = "172.17.0.2:3306,172.17.0.3:3306,172.17.0.4:3306"
db-servers-prefered-master = "172.17.0.4:3306"
db-servers-credential = "super:123456"
replication-credential = "super:123456"
failover-mode = "manual"
[Default]
monitoring-datadir = "/data/replication-manager"
monitoring-sharedir = "/data/share_replication-manager"
log-level=7
log-file = "/var/log/replication-manager.log"
replication-multi-master = false
replication-multi-tier-slave = false
failover-readonly-state = true
http-server = true
http-bind-address = "0.0.0.0"
http-port = "10001"

 

 

 

 

https://docs.signal18.io/installation/setup-instructions

posted @ 2020-03-14 11:13  fengjian1585  阅读(1115)  评论(0编辑  收藏  举报