时间:2021-07-01 10:21:17 帮助过:27人阅读
一、服务器分布二、MySQL-MMM配置(1)、公共配置【所有DB节点:Master1、Master2、Slave1、Slave2Monitor节点】#vim/etc/mysql-mmm/mmm_common.confactive_master
一、服务器分布
二、MySQL-MMM 配置
(1)、公共配置【所有DB节点:Master1、Master2、Slave1、Slave2 Monitor节点】
# vim /etc/mysql-mmm/mmm_common.conf
active_master_role writer# vim/etc/mysql-mmm/mmm_agent.conf
include mmm_common.conf this db1# vim/etc/mysql-mmm/mmm_agent.conf
include mmm_common.conf this db2# vim/etc/mysql-mmm/mmm_agent.conf
include mmm_common.conf this db3# vim/etc/mysql-mmm/mmm_agent.conf
include mmm_common.conf this db4
(3)、Monitor节点
# vim /etc/mysql-mmm/mmm_mon.conf
include mmm_common.conf
# vim /data/scripts/refresh_vip.sh
#!/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin MMM_COMM_CONF="/etc/mysql-mmm/mmm_common.conf" ETH_NAME=`awk '/cluster_interface/{print $2}' ${MMM_COMM_CONF}` VIP_ADDR=`grep -A 2 '* * * * * sleep 10; /data/scripts/refresh_vip.sh >/dev/null 2>&1
* * * * * sleep 20; /data/scripts/refresh_vip.sh >/dev/null 2>&1
* * * * * sleep 30; /data/scripts/refresh_vip.sh >/dev/null 2>&1
* * * * * sleep 40; /data/scripts/refresh_vip.sh >/dev/null 2>&1
* * * * * sleep 50; /data/scripts/refresh_vip.sh >/dev/null 2>&1
本文出自 “人生理想在于坚持不懈” 博客,,请务必保留此出处