mmm架构部署

2018-01-16  本文已影响0人  donglq

目标

实现mysql的mmm架构

备注

步骤

安装数据库
设置主从复制
GRANT REPLICATION SLAVE ON *.* to 'rep'@'ip' identified by 'replication';
show master status;
change master to master_host='ip',
master_port=33086,
master_user='rep',  master_password='replication', master_log_file='mysql-bin.000004', master_log_pos=445;
start slave;
MMM的安装与配置
sudo yum -y install mysql-mmm-monitor
sudo yum -y install mysql-mmm-agent
GRANT REPLICATION CLIENT ON *.* TO 'mmm_monitor'@'ip' IDENTIFIED BY 'donglq';
GRANT SUPER, REPLICATION CLIENT, PROCESS ON *.* TO 'mmm_agent'@'ip' IDENTIFIED BY 'donglq';
server1: sudo ip addr add 10.89.10.230/24 dev eth0
server2: sudo ip addr add 10.89.10.231/24 dev eth0
server3: sudo ip addr add 10.89.10.232/24 dev eth0
ip  addr show //查看
sudo /etc/init.d/mysql-mmm-agent @6 start
sudo /etc/init.d/mysql-mmm-monitor @6 start
sudo mmm_control @6 show
sudo mmm_control @6 set_online db2
sudo netstat -pna|grep 端口
上一篇下一篇

猜你喜欢

热点阅读