Get the App
SLTechnology News&Howtos  ›  Servers  › 

MySQL High availability Cluster Architecture-- MHA Architecture

Shulou Source: shulou.com Published: 2022-06-03 05:55:56 09月21日 Update

< /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!

Tags: Data service server configuration database log script failure switch node password user binary file synchronization compilation directory management environment check Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Linux Shulou Technology Xiaomi Shulou Information