Rumah  >  Artikel  >  pangkalan data  >  MySQL-MMM切换演示

MySQL-MMM切换演示

WBOY
WBOYasal
2016-06-07 17:40:591807semak imbas

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)

 

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

,香港虚拟主机
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn