mysqlMMM - juedaiyuer/researchNote GitHub Wiki
#MySQL---MMM架构#
Multi-Master Replication Manager
监控和管理MySQL的主主复制拓扑,并在当前的主服务器失效时,进行主和主备服务器之间的主从切换和故障转移等工作
MMM提供了什么功能
- 监控了MySQL主从复制健康情况
- 在主库出现宕机时进行故障转移并自动配置其它从库对新主的复制
- 提供了主,写虚拟IP,在主从服务器出现问题时可以自动迁移虚拟IP
如何找到从库对应的新的主库日志点的日志同步点
如果存在多个从库数据不一致的情况如何处理
##MMM部署所需资源##
##MMM部署步骤##
- 配置主主复制及主从同步集群
- 安装主从节点所需要的支持包(Perl的依赖包)
- 安装及配置MMM工具集
- 运行MMM监控服务
- 测试
主从配置
配置yum源
wget http://mirrors.opencas.cn/epel/epel-release-latest-6.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -ivh epel-release-latest-6.noarch.rpm
rpm -ivh remi-release-6.rpm
vi /etc/yum.repos.d/remi.repo
enabled=1
vi /etc/yum.repos.d/epel.repo
baseurl 去掉注释
mirrorlist 注释掉
安装
yum sercha mmm
yum install mysql-mmm-agent.noarch -y
yum -y install mysql-mmm*
mysql> grant replication client on *.* to 'mmm_monitor'@'192.168.3.%' identified by 'yourpassword';
mysql> grant super,replication client,process on *.* to 'mmm_monitor'@'192.168.3.%' identified by 'yourpassword';