码迷,mamicode.com
首页 > 其他好文 > 详细

replication-manager 搭建

时间:2018-09-02 23:53:26      阅读:841      评论:0      收藏:0      [点我收藏+]

标签:release   als   ast   sts   ble   plugin   cti   false   over   

replication-manager 搭建

介绍

replication-manager 主要用于mysql主从结构的监控和主从切换.

安装

vi /etc/yum.repos.d/signal18.repo
\\加入一下内容
[signal18]
name=Signal18 repositories
baseurl=http://repo.signal18.io/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
  • yum安装
[root@db210_17:58:57 /] 
#yum install replication-manager-osc
Loaded plugins: fastestmirror
signal18                                                                                                                                                                                                                                               ....
Installed:
  replication-manager-osc.x86_64 1532599358:2.0.1_6_g0ff0d-1 
  Complete!

配置

vi /etc/replication-manager/config.toml
[db3306]
title = "db3306"
db-servers-hosts = "192.168.99.210:3508,192.168.99.211:3508,192.168.99.212:3508"
db-servers-prefered-master = "192.168.99.210:3508"
db-servers-credential = "wyz:****"
replication-credential = "repl:re****"
failover-mode = "manual"
proxysql=true
proxysql-server="192.168.99.210"
proxysql-port=6033
proxysql-admin-port=6032
proxysql-writer-hostgroup=10
proxysql-reader-hostgroup=11
proxysql-user="adfz"
proxysql-password="****"
proxysql-bootstrap=false
[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"
[root@db210_18:34:16 /etc/replication-manager] 

启动

#/etc/init.d/replication-manager start
#netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 192.168.99.210:8301     0.0.0.0:*               LISTEN      11216/consul       
tcp        0      0 0.0.0.0:6032            0.0.0.0:*               LISTEN      51847/proxysql     
tcp        0      0 0.0.0.0:6033            0.0.0.0:*               LISTEN      51847/proxysql     
tcp        0      0 0.0.0.0:23507           0.0.0.0:*               LISTEN      11527/mysqld       
tcp        0      0 0.0.0.0:3507            0.0.0.0:*               LISTEN      11527/mysqld       
tcp        0      0 127.0.0.1:8500          0.0.0.0:*               LISTEN      11216/consul       
tcp        0      0 0.0.0.0:3508            0.0.0.0:*               LISTEN      93705/mysqld       
tcp        0      0 127.0.0.1:8600          0.0.0.0:*               LISTEN      11216/consul       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2991/master        
tcp        0      0 0.0.0.0:3322            0.0.0.0:*               LISTEN      2381/sshd          
tcp6       0      0 :::10001                :::*                    LISTEN      103773/replication-
tcp6       0      0 :::3322                 :::*                    LISTEN      2381/sshd          
[root@db210_18:35:19 /etc/replication-manager] 

在浏览器中打开:http://192.168.99.210:10001/

技术分享图片

主从切换

  • 切换前(点击界面中:switchover)
    技术分享图片
    技术分享图片

  • 切换后
    技术分享图片
    技术分享图片

replication-manager 搭建

标签:release   als   ast   sts   ble   plugin   cti   false   over   

原文地址:https://www.cnblogs.com/2woods/p/9575621.html

(1)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!