当前位置:Gxlcms > mysql > MySQL-MMM切换演示

MySQL-MMM切换演示

时间:2021-07-01 10:21:17 帮助过:41人阅读

MMM(Multi-MasterReplicationManagerforMySQL)是基于双Master结构,后面接N台Slave安装很简单,官网提供了很详细的安装文档:http://mysql-mmm.org/mmm2:guide

安装很简单,香港虚拟主机,官网提供了很详细的安装文档:

:guide

3台环境做测试

服务都起来后,状态如下:

[root@M1 mysql-mmm]# mmm_control show

M2(192.168.8.26) master/ONLINE. Roles:

slave1(192.168.8.27) slave/ONLINE. Roles: reader(192.168.8.52)

[root@M1 mysql-mmm]# mmm_control show

M1(192.168.8.25) master/HARD_OFFLINE. Roles:

M2(192.168.8.26) master/ONLINE. Roles: writer(192.168.8.51)

slave1(192.168.8.27) slave/ONLINE. Roles: reader(192.168.8.52)

======================================================

[root@M1 mysql-mmm]# mmm_control show

M1(192.168.8.25) master/ONLINE. Roles:

M2(192.168.8.26) master/ONLINE. Roles: writer(192.168.8.51)

slave1(192.168.8.27) slave/ONLINE. Roles: reader(192.168.8.52)

======================================================

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

[root@M1 mysql-mmm]# mmm_control show

M1(192.168.8.25) master/ONLINE. Roles: reader(192.168.8.52)

M2(192.168.8.26) master/ONLINE. Roles: writer(192.168.8.51)

slave1(192.168.8.27) slave/REPLICATION_FAIL. Roles:

======================================================


[root@M1 mysql-mmm]# mmm_control show

M1(192.168.8.25) master/REPLICATION_FAIL. Roles:

M2(192.168.8.26) master/ONLINE. Roles: reader(192.168.8.52), writer(192.168.8.51)

slave1(192.168.8.27) slave/REPLICATION_FAIL. Roles:

=========================================================


[root@M1 mysql-mmm]# mmm_control show

M1(192.168.8.25) master/REPLICATION_FAIL. Roles:

M2(192.168.8.26) master/ONLINE. Roles: writer(192.168.8.51)

slave1(192.168.8.27) slave/ONLINE. Roles: reader(192.168.8.52)

本文出自 “贺春旸的技术专栏” 博客,香港服务器,请务必保留此出处

,香港虚拟主机

人气教程排行