2000人QQ群 : 67842417
Join us if you will.

mysql MMM启停顺序

1. 启动所有节点的mysql

[root@db1 ~]# /etc/init.d/mysqld start
Starting MySQL.. SUCCESS! 

[root@db2 ~]# /etc/init.d/mysqld start
Starting MySQL.. SUCCESS! 

[root@db3 ~]# /etc/init.d/mysqld start
Starting MySQL.. SUCCESS! 

[root@db4 ~]# /etc/init.d/mysqld start
Starting MySQL.. SUCCESS! 

2. 启动MMM agent

[root@db1 ~]#/etc/init.d/mysql-mmm-agent start
started OK !

[root@db2 ~]#/etc/init.d/mysql-mmm-agent start
started OK !

[root@db3 ~]#/etc/init.d/mysql-mmm-agent start
started OK !

[root@db4 ~]#/etc/init.d/mysql-mmm-agent start
started OK !

3. 启动mmm monitor

[root@db4 ~]#/etc/init.d/mysql-mmm-monitor start
started OK !
# 注意 mysql-mmm-monitor 只有一台.

4. 查看mmm状态

[root@db4 ~]#mmm_control show
  db1(10.1.166.22) master/ONLINE. Roles: writer(10.1.166.50)
  db2(10.1.166.23) master/ONLINE. Roles: reader(10.1.166.52)
  db3(10.1.166.25) slave/ONLINE. Roles: reader(10.1.166.56)
  db4(10.1.166.26) slave/ONLINE. Roles: reader(10.1.166.55)

5. 设置状态

如果状态是,HARD_OFFLINE

[root@db1 ~]#  mmm_control set_online db1

[root@db2 ~]# mmm_control set_online db1

[root@db3 ~]# mmm_control set_online db2

[root@db4~]#  mmm_control set_online db3

#一般不需要手动设置,状态会自动变成4.的 ONLINE

One Comment - Leave a Comment
  • Leave a comment

    电子邮件地址不会被公开。 必填项已用*标注