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

How Mysql MHA deployments fail over

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you how to deploy Mysql MHA for failover, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Mysql MHA deployment-failover

Architecture description:

Reference: http://www.zhaibibei.cn/mysql/mha/

1 main library 187View IP and VIP information

[root@rac1 ~] # ifconfig

Enp0s3: flags=4163 mtu 1500

Inet 192.168.2.187 netmask 255.255.255.0 broadcast 192.168.2.255

Inet6 fe80::c3b0:4e87:f38f:d640 prefixlen 64 scopeid 0x20

Inet6 fe80::a3a6:33e0:1848:f prefixlen 64 scopeid 0x20

Inet6 fe80::63c7:f30:11a7:4216 prefixlen 64 scopeid 0x20

Ether 08:00:27:83:9e:5c txqueuelen 1000 (Ethernet)

RX packets 12552 bytes 909017 (887.7 KiB)

RX errors 0 dropped 996 overruns 0 frame 0

TX packets 391 bytes 47354 (46.2 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Enp0s3:2: flags=4163 mtu 1500

Inet 192.168.2.189 netmask 255.255.255.0 broadcast 192.168.2.255

Ether 08:00:27:83:9e:5c txqueuelen 1000 (Ethernet)

2 View current synchronization information from the library

-188:

Mysql > show slave status\ G

* * 1. Row *

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.2.187

Master_User: repl

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000010

Read_Master_Log_Pos: 250

Relay_Log_File: mysql-relay.000002

Relay_Log_Pos: 320

Relay_Master_Log_File: mysql-bin.000010

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

-223:

Mysql > show slave status\ G

* * 1. Row *

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.2.187

Master_User: repl

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000010

Read_Master_Log_Pos: 250

Relay_Log_File: mysql-relay.000002

Relay_Log_Pos: 320

Relay_Master_Log_File: mysql-bin.000010

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Replicate_Do_DB:

3 the management node views the information

222:

[root@rac4] # masterha_check_status-- conf=/etc/mha/mha.conf

Mha (pid:3057) is running (0:PING_OK), master:rac1

4 the main library stops mysql manually

187:

[mysql@rac1 ~] $service mysqld stop

Shutting down MySQL. [OK]

5 the management node views the failover process

222:

[root@rac4 manager] # tail-f mha.log

.

-(1) confirm the status of the main library (not reachable)

Sun Mar 15 14:01:16 2020-[warning] Got error on MySQL select ping: 2006 (MySQL server has gone away)

Sun Mar 15 14:01:16 2020-[info] Executing secondary network check script: / usr/bin/masterha_secondary_check-s 192.168.2.188-s 192.168.2.223-user=root-- master_host=192.168.2.187-- master_ip=192.168.2.187-- master_port=3306-- user=root-- master_host=rac1-- master_ip=192.168.2.187-- master_port=3306-- master_user=monitor-- master_password=123456-- ping_type=SELECT

Sun Mar 15 14:01:16 2020-[info] Executing SSH check script: save_binary_logs-command=test-start_pos=4-binlog_dir=/datalog/mysql/binlog-output_file=/etc/mha/node/save_binary_logs_test-manager_version=0.56-binlog_prefix=mysql-bin

Sun Mar 15 14:01:17 2020-[info] HealthCheck: SSH to rac1 is reachable.

Monitoring server 192.168.2.188 is reachable, Master is not reachable from 192.168.2.188. OK.

Monitoring server 192.168.2.223 is reachable, Master is not reachable from 192.168.2.223. OK.

Sun Mar 15 14:01:17 2020-[info] Master is not reachable from all other monitoring servers. Failover should start.

Sun Mar 15 14:01:17 2020-[warning] Got error on MySQL connect: 2003 (Can't connect to MySQL server on '192.168.2.187')

Sun Mar 15 14:01:17 2020-[warning] Connection failed 2 time (s)..

Sun Mar 15 14:01:18 2020-[warning] Got error on MySQL connect: 2003 (Can't connect to MySQL server on '192.168.2.187')

Sun Mar 15 14:01:18 2020-[warning] Connection failed 3 time (s)..

Sun Mar 15 14:01:19 2020-[warning] Got error on MySQL connect: 2003 (Can't connect to MySQL server on '192.168.2.187')

Sun Mar 15 14:01:19 2020-[warning] Connection failed 4 time (s)..

Sun Mar 15 14:01:19 2020-[warning] Master is not reachable from health checker!

Sun Mar 15 14:01:19 2020-[warning] Master rac1 (192.168.2.187 Master rac1 3306) is not reachable!

Sun Mar 15 14:01:19 2020-[warning] SSH is reachable.

-- (2) re-check the status of the master-slave (rac1,rac2,rac3) server

-confirm master is down. Rac2,rac3 from the library is available.

Sun Mar 15 14:01:19 2020-[info] Connecting to a master server failed. Reading configuration file / etc/masterha_default.cnf and / etc/mha/mha.conf again, and trying to connect to all servers to check server status..

Sun Mar 15 14:01:19 2020-[warning] Global configuration file / etc/masterha_default.cnf not found. Skipping.

Sun Mar 15 14:01:19 2020-[info] Reading application default configuration from / etc/mha/mha.conf..

Sun Mar 15 14:01:19 2020-[info] Reading server configuration from / etc/mha/mha.conf..

Sun Mar 15 14:01:20 2020-[info] GTID failover mode = 0

Sun Mar 15 14:01:20 2020-[info] Dead Servers:

Sun Mar 15 14:01:20 2020-[info] rac1 (192.168.2.187 purl 3306)

Sun Mar 15 14:01:20 2020-[info] Alive Servers:

Sun Mar 15 14:01:20 2020-[info] rac2 (192.168.2.188 Sun Mar 3306)

Sun Mar 15 14:01:20 2020-[info] rac3 (192.168.2.223 rac3 3306)

Sun Mar 15 14:01:20 2020-[info] Alive Slaves:

Sun Mar 15 14:01:20 2020-[info] rac2 (192.168.2.188 Version=5.7.28-log) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:20 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:20 2020-[info] Primary candidate for the new Master (candidate_master is set)

Sun Mar 15 14:01:20 2020-[info] rac3 (192.168.2.223) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:20 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:20 2020-[info] Not candidate for the new Master (no_master is set)

Sun Mar 15 14:01:20 2020-[info] Checking slave configurations..

Sun Mar 15 14:01:20 2020-[warning] relay_log_purge=0 is not set on slave rac2 (192.168.2.188 Sun Mar 3306)

Sun Mar 15 14:01:20 2020-[warning] relay_log_purge=0 is not set on slave rac3 (192.168.2.223 relay_log_purge=0 is not set on slave rac3).

Sun Mar 15 14:01:20 2020-[info] Checking replication filtering settings..

Sun Mar 15 14:01:20 2020-[info] Replication filtering check ok.

Sun Mar 15 14:01:20 2020-[info] Master is down!

Sun Mar 15 14:01:20 2020-[info] Terminating monitoring script.

Sun Mar 15 14:01:20 2020-[info] Got exit code 20 (Master dead).

-- (3) MasterFailover profile confirmation

Sun Mar 15 14:01:20 2020-[info] MHA::MasterFailover version 0.56.

Sun Mar 15 14:01:20 2020-[info] Starting master failover.

Sun Mar 15 14:01:20 2020-[info]

Sun Mar 15 14:01:20 2020-[info] * Phase 1: Configuration Check Phase..

Sun Mar 15 14:01:20 2020-[info]

Sun Mar 15 14:01:22 2020-[info] GTID failover mode = 0

Sun Mar 15 14:01:22 2020-[info] Dead Servers:

Sun Mar 15 14:01:22 2020-[info] rac1 (192.168.2.187 purl 3306)

Sun Mar 15 14:01:22 2020-[info] Checking master reachability via MySQL (double check).

Sun Mar 15 14:01:22 2020-[info] ok.

Sun Mar 15 14:01:22 2020-[info] Alive Servers:

Sun Mar 15 14:01:22 2020-[info] rac2 (192.168.2.188 Sun Mar 3306)

Sun Mar 15 14:01:22 2020-[info] rac3 (192.168.2.223 rac3 3306)

Sun Mar 15 14:01:22 2020-[info] Alive Slaves:

Sun Mar 15 14:01:22 2020-[info] rac2 (192.168.2.188 Version=5.7.28-log) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:22 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:22 2020-[info] Primary candidate for the new Master (candidate_master is set)

Sun Mar 15 14:01:22 2020-[info] rac3 (192.168.2.223) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:22 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:22 2020-[info] Not candidate for the new Master (no_master is set)

Sun Mar 15 14:01:22 2020-[info] Starting Non-GTID based failover.

Sun Mar 15 14:01:22 2020-[info]

-(4) disable VIP on rac1 and stop rac1

There is no shutdown_script defined, so there is no call to

Sun Mar 15 14:01:22 2020-[info] * * Phase 1: Configuration Check Phase completed.

Sun Mar 15 14:01:22 2020-[info]

Sun Mar 15 14:01:22 2020-[info] * Phase 2: Dead Master Shutdown Phase..

Sun Mar 15 14:01:22 2020-[info]

Sun Mar 15 14:01:22 2020-[info] Forcing shutdown so that applications never connect to the current master..

Sun Mar 15 14:01:22 2020-[info] Executing master IP deactivation script:

Sun Mar 15 14:01:22 2020-[info] / etc/mha/script/master_ip_failover-orig_master_host=rac1-orig_master_ip=192.168.2.187-orig_master_port=3306-command=stopssh-ssh_user=root

Disabling the VIP an old master: rac1

-failed to disable VIP (it is estimated that there is a problem with the Nic setting)

SIOCSIFFLAGS: Cannot assign requested address

Sun Mar 15 14:01:22 2020-[info] done.

Sun Mar 15 14:01:22 2020-[warning] shutdown_script is not set. Skipping explicit shutting down of the dead master.

Sun Mar 15 14:01:22 2020-[info] * Phase 2: Dead Master Shutdown Phase completed.

Sun Mar 15 14:01:22 2020-[info]

-- (5) recover the latest slave from the main database

Sun Mar 15 14:01:22 2020-[info] * Phase 3: Master Recovery Phase..

Sun Mar 15 14:01:22 2020-[info]

Sun Mar 15 14:01:22 2020-[info] * Phase 3.1: Getting Latest Slaves Phase..

Sun Mar 15 14:01:22 2020-[info]

Sun Mar 15 14:01:22 2020-[info] The latest binary log file/position on all slaves is mysql-bin.000015:250

Sun Mar 15 14:01:22 2020-[info] Latest slaves (Slaves that received relay log files to the latest):

Sun Mar 15 14:01:22 2020-[info] rac2 (192.168.2.188 Version=5.7.28-log) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:22 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:22 2020-[info] Primary candidate for the new Master (candidate_master is set)

Sun Mar 15 14:01:22 2020-[info] rac3 (192.168.2.223) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:22 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:22 2020-[info] Not candidate for the new Master (no_master is set)

Sun Mar 15 14:01:22 2020-[info] The oldest binary log file/position on all slaves is mysql-bin.000015:250

Sun Mar 15 14:01:22 2020-[info] Oldest slaves:

Sun Mar 15 14:01:22 2020-[info] rac2 (192.168.2.188 Version=5.7.28-log) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:22 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:22 2020-[info] Primary candidate for the new Master (candidate_master is set)

Sun Mar 15 14:01:22 2020-[info] rac3 (192.168.2.223) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:22 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:22 2020-[info] Not candidate for the new Master (no_master is set)

Sun Mar 15 14:01:22 2020-[info]

Sun Mar 15 14:01:22 2020-[info] * Phase 3.2: Saving Dead Master's Binlog Phase..

Sun Mar 15 14:01:22 2020-[info]

Sun Mar 15 14:01:22 2020-[info] Fetching dead master's binary logs..

Sun Mar 1514: 01:22 2020-[info] Executing command on the dead master rac1: save_binary_logs-- command=save-- start_file=mysql-bin.000015-- start_pos=250-- binlog_dir=/datalog/mysql/binlog-- output_file=/etc/mha/node/saved_master_binlog_from_rac1_3306_20200315140120.binlog-- handle_raw_binlog=1-- disable_log_bin=0-- manager_version=0.56

Creating / etc/mha/node if not exists.. Ok.

Concat binary/relay logs from mysql-bin.000015 pos 250 to mysql-bin.000015 EOF into / etc/mha/node/saved_master_binlog_from_rac1_3306_20200315140120.binlog..

Binlog Checksum enabled

Dumping binlog format description event, from position 0 to 250.. Ok.

No need to dump effective binlog data from / datalog/mysql/binlog/mysql-bin.000015 (pos starts 250, filesize 250). Skipping.

ERROR: Error in Log_event::read_log_event (): 'Found invalid event in binary log', data_len: 127, event_type: 35

Binlog Checksum enabled

/ etc/mha/node/saved_master_binlog_from_rac1_3306_20200315140120.binlog has no effective data events.

Event not exists.

Sun Mar 15 14:01:23 2020-[info] Additional events were not found from the orig master. No need to save.

Sun Mar 15 14:01:23 2020-[info]

-(6) decide on the new main library 188

Sun Mar 15 14:01:23 2020-[info] * Phase 3.3: Determining New Master Phase..

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] Finding the latest slave that has all relay logs for recovering other slaves..

Sun Mar 15 14:01:23 2020-[info] All slaves received relay logs to the same position. No need to resync each other.

Sun Mar 15 14:01:23 2020-[info] Searching new master from slaves..

Sun Mar 15 14:01:23 2020-[info] Candidate masters from the configuration file:

Sun Mar 15 14:01:23 2020-[info] rac2 (192.168.2.188 Version=5.7.28-log) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:23 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:23 2020-[info] Primary candidate for the new Master (candidate_master is set)

Sun Mar 15 14:01:23 2020-[info] Non-candidate masters:

Sun Mar 15 14:01:23 2020-[info] rac3 (192.168.2.223) Version=5.7.28-log (oldest major version between slaves) log-bin:enabled

Sun Mar 15 14:01:23 2020-[info] Replicating from 192.168.2.187 (192.168.2.187 Replicating from 3306)

Sun Mar 15 14:01:23 2020-[info] Not candidate for the new Master (no_master is set)

Sun Mar 15 14:01:23 2020-[info] Searching from candidate_master slaves which have received the latest relay log events..

Sun Mar 15 14:01:23 2020-[info] New master is rac2 (192.168.2.188 Sun Mar 3306)

Sun Mar 15 14:01:23 2020-[info] Starting master failover..

Sun Mar 15 14:01:23 2020-[info]

From:

Rac1 (192.168.2.187) (current master)

+-- rac2 (192.168.2.188 rac2 3306)

+-- rac3 (192.168.2.223)

To:

Rac2 (192.168.2.188) (new master)

+-- rac3 (192.168.2.223)

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] * Phase 3.3: New Master Diff Log Generation Phase..

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] This server has all relay logs. No need to generate diff files from the latest slave.

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] * Phase 3.4: Master Log Apply Phase..

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] * NOTICE: If any error happens from this phase, manual recovery is needed.

Sun Mar 15 14:01:23 2020-[info] Starting recovery on rac2 (192.168.2.188 Sun Mar 3306)..

Sun Mar 15 14:01:23 2020-[info] This server has all relay logs. Waiting all logs to be applied..

Sun Mar 15 14:01:23 2020-[info] done.

Sun Mar 15 14:01:23 2020-[info] All relay logs were successfully applied.

Sun Mar 15 14:01:23 2020-[info] Getting new master's binlog name and position..

Sun Mar 15 14:01:23 2020-[info] mysql-bin.000012:234

Sun Mar 15 14:01:23 2020-[info] All other slaves should start replication from here. Statement should be: CHANGE MASTER TO MASTER_HOST='rac2 or 192.168.2.188, MASTER_PORT=3306, MASTER_LOG_FILE='mysql-bin.000012', MASTER_LOG_POS=234, MASTER_USER='repl', MASTER_PASSWORD='xxx'

Sun Mar 15 14:01:23 2020-[info] Executing master IP activate script:

Sun Mar 15 14:01:23 2020-[info] / etc/mha/script/master_ip_failover-- command=start-- ssh_user=root-- orig_master_host=rac1-- orig_master_ip=192.168.2.187-- orig_master_port=3306-- new_master_host=rac2-new_master_ip=192.168.2.188-- new_master_port=3306-- new_master_user='monitor'-- new_master_password='123456'

Set read_only=0 on the new master.

Enabling the VIP 192.168.2.189 on the new master: rac2

Sun Mar 15 14:01:23 2020-[info] OK.

Sun Mar 15 14:01:23 2020-[info] * * Finished master recovery successfully.

Sun Mar 15 14:01:23 2020-[info] * Phase 3: Master Recovery Phase completed.

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] * Phase 4: Slaves Recovery Phase..

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info] * Phase 4.1: Starting Parallel Slave Diff Log Generation Phase..

Sun Mar 15 14:01:23 2020-[info]

Sun Mar 15 14:01:23 2020-[info]-- Slave diff file generation on host rac3 (192.168.2.223 started) started, pid: 10164. Check tmp log / etc/mha/manager/rac3_3306_20200315140120.log if it takes time..

Sun Mar 15 14:01:24 2020-[info]

Sun Mar 15 14:01:24 2020-[info] Log messages from rac3...

Sun Mar 15 14:01:24 2020-[info]

Sun Mar 15 14:01:23 2020-[info] This server has all relay logs. No need to generate diff files from the latest slave.

Sun Mar 15 14:01:24 2020-[info] End of log messages from rac3.

Sun Mar 15 14:01:24 2020-[info]-- rac3 (192.168.2.223 has the latest relay log events) has the latest relay log events.

Sun Mar 15 14:01:24 2020-[info] Generating relay diff files from the latest slave succeeded.

Sun Mar 15 14:01:24 2020-[info]

Sun Mar 15 14:01:24 2020-[info] * Phase 4.2: Starting Parallel Slave Log Apply Phase..

Sun Mar 15 14:01:24 2020-[info]

Sun Mar 15 14:01:24 2020-[info]-- Slave recovery on host rac3 (192.168.2.223 started) started, pid: 10166. Check tmp log / etc/mha/manager/rac3_3306_20200315140120.log if it takes time..

Sun Mar 15 14:01:25 2020-[info]

Sun Mar 15 14:01:25 2020-[info] Log messages from rac3...

Sun Mar 15 14:01:25 2020-[info]

Sun Mar 15 14:01:24 2020-[info] Starting recovery on rac3 (192.168.2.223 Starting recovery on rac3 3306)

Sun Mar 15 14:01:24 2020-[info] This server has all relay logs. Waiting all logs to be applied..

Sun Mar 15 14:01:24 2020-[info] done.

Sun Mar 15 14:01:24 2020-[info] All relay logs were successfully applied.

Sun Mar 15 14:01:24 2020-[info] Resetting slave rac3 (192.168.2.223) and starting replication from the new master rac2 (192.168.2.188).

Sun Mar 15 14:01:24 2020-[info] Executed CHANGE MASTER.

Sun Mar 15 14:01:24 2020-[info] Slave started.

Sun Mar 15 14:01:25 2020-[info] End of log messages from rac3.

Sun Mar 15 14:01:25 2020-[info]-- Slave recovery on host rac3 (192.168.2.223 succeeded) succeeded.

Sun Mar 15 14:01:25 2020-[info] All new slave servers recovered successfully.

Sun Mar 15 14:01:25 2020-[info]

-(7) cleanup stage

Sun Mar 15 14:01:25 2020-[info] * Phase 5: New master cleanup phase..

Sun Mar 15 14:01:25 2020-[info]

Sun Mar 15 14:01:25 2020-[info] Resetting slave info on the new master..

Sun Mar 15 14:01:25 2020-[info] rac2: Resetting slave info succeeded.

Sun Mar 15 14:01:25 2020-[info] Master failover to rac2 (192.168.2.188) completed successfully.

Sun Mar 15 14:01:25 2020-[info] Deleted server1 entry from / etc/mha/mha.conf.

Sun Mar 15 14:01:25 2020-[info]

-- (8) failover report

-Failover Report-

Mha: MySQL Master failover rac1 (192.168.2.187) to rac2 (192.168.2.188) succeeded

Master rac1 (192.168.2.187) is down!

Check MHA Manager logs at rac4:/etc/mha/manager/mha.log for details.

Started automated (non-interactive) failover.

Invalidated master IP address on rac1 (192.168.2.187 3306)

The latest slave rac2 (192.168.2.188) has all relay logs for recovery.

Selected rac2 (192.168.2.188) as a new master.

Rac2 (192.168.2.188): OK: Applying all logs succeeded.

Rac2 (192.168.2.188): OK: Activated master IP address.

Rac3 (192.168.2.223): This host has the latest relay log events.

Generating relay diff files from the latest slave succeeded.

Rac3 (192.168.2.223): OK: Applying all logs succeeded. Slave started, replicating from rac2 (192.168.2.188 purl 3306)

Rac2 (192.168.2.188): Resetting slave info succeeded.

Master failover to rac2 (192.168.2.188) completed successfully.

6 View 223 the master library corresponding to the slave library has been automatically switched from 187 to 188

223:

Mysql > show slave status\ G

* * 1. Row *

Slave_IO_State: Waiting for master to send event

Master_Host: 192.168.2.188

Master_User: repl

Master_Port: 3306

Connect_Retry: 60

Master_Log_File: mysql-bin.000009

Read_Master_Log_Pos: 234

Relay_Log_File: mysql-relay.000008

Relay_Log_Pos: 407

Relay_Master_Log_File: mysql-bin.000009

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

7 check that VIP189 has drifted from 187nodes to 188s

188:

[root@rac2 ~] # ifconfig | grep 192

Inet 192.168.2.188 netmask 255.255.255.0 broadcast 192.168.2.255

Inet 192.168.2.189 netmask 255.255.255.0 broadcast 192.168.2.255

Inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255

So much for the failover of Mysql MHA deployment. I hope the above can help you and learn more. If you think the article is good, you can share it for more people to see.

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

Database

Wechat

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

12
Report