Home > Database > Mysql Tutorial > ubuntu下Mysql的HA(corosync+pacemaker+drbd)

ubuntu下Mysql的HA(corosync+pacemaker+drbd)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:15:31
Original
1487 people have browsed it

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 验证crm status Master/Slave Set: ms_mysqldrbd [mysqldrbd] Masters: [ ha1 ] Slaves: [ ha2 ] mystore (ocf::heartbeat:Filesystem):Started ha1 mysql (lsb:mysql):Started ha1 vip (ocf::heartb

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

 

  验证crm status

  Master/Slave Set: ms_mysqldrbd [mysqldrbd]

  Masters: [ ha1 ]

  Slaves: [ ha2 ]

  mystore (ocf::heartbeat:Filesystem):Started ha1

  mysql (lsb:mysql):Started ha1

  vip (ocf::heartbeat:IPaddr):Started ha1

  四、验证:

  1、客户端mysql验证:

  mysql -uroot -p -h 192.168.153.200

  mysql> show databases;

  +--------------------+

  | Database |

  +--------------------+

  | information_schema |

  | mysql |

  | performance_schema |

  | test |

  | test1 |

  +--------------------+

  2、模拟故障:

  root@ha1:~# crm

  crm(live)# node

  crm(live)node# standby

  crm(live)node# show

  ha1: normal

  standby: on

  ha2: normal

  crm(live)node# exit

  bye

  此时看一下状态:

  root@ha1:~# crm status

  Node ha1: standby

  Online: [ ha2 ]

  Master/Slave Set: ms_mysqldrbd [mysqldrbd]

  Masters: [ ha2 ]

  Stopped: [ mysqldrbd:0 ]

  mystore (ocf::heartbeat:Filesystem):Started ha2

  mysql (lsb:mysql):Started ha2

  vip (ocf::heartbeat:IPaddr):Started ha2

  此时,mysql已经运行于ha2上了。

  [1] [2] [3] 

ubuntu下Mysql的HA(corosync+pacemaker+drbd)

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template