Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL High availability Cluster Architecture-- MHA Architecture

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

< /dev/null >

/ var/log/masterha/app1/manager.log 2 > & 1 & # # check the MHA status and you can see that the current master is a mysql node [root@manager scripts] # masterha_check_status-- conf=/etc/masterha/app1.cnfapp1 (pid:43036) is running (0:PING_OK), master:192.168.13.12916 Fault simulation [root@manager scripts] # tailf / var/log/masterha/app1/manager.log # # start monitoring and observation logging # # turn off the master server [root@master mha4mysql-node-0.57] # pkill-9 mysql can see the status of the slave library Vip will switch to one of the slave libraries: [root@slave1 mha4mysql-node-0.57] # ifconfig ens33: flags=4163 mtu 1500 inet 192.168.13.130 netmask 255.255.255.0 broadcast 192.168.13.255ens33:1: flags=4163 mtu 1500 inet 192.168.13.100 netmask 255.255.0 broadcast 192.168.13.255 ether 00:0c:29:af:94:06 txqueuelen 1000 (Ethernet) at this time Install mysql on manager, and the client can also connect to the database through virtual ip: # # mysql > grant all on *. * to 'root'@'%' identified by' abc123' on the database server of vip Query OK, 0 rows affected (0.00 sec) # # Log in with virtual ip on the client [root@manager ~] # mysql-uroot-h 192.168.13.100-p # # specify virtual ipEnter password: # # enter password MySQL [(none)] > Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report