国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

MySQL MHA failover步驟

2024-07-24 12:35:49
字體:
供稿:網(wǎng)友
        MySQL MHA failover步驟:

  1、切換過程
 
  [root@es3 ~]# masterha_check_repl --conf=/root/app1.cnf
  Tue Aug 20 10:22:41 2019 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
  Tue Aug 20 10:22:41 2019 - [info] Reading application default configuration from /root/app1.cnf..
  Tue Aug 20 10:22:41 2019 - [info] Reading server configuration from /root/app1.cnf..
  Tue Aug 20 10:22:41 2019 - [info] MHA::MasterMonitor version 0.58.
  Tue Aug 20 10:22:42 2019 - [info] GTID failover mode = 1
  Tue Aug 20 10:22:42 2019 - [info] Dead Servers:
  Tue Aug 20 10:22:42 2019 - [info] Alive Servers:
  Tue Aug 20 10:22:42 2019 - [info]   es1(192.168.56.14:3306)
  Tue Aug 20 10:22:42 2019 - [info]   es2(192.168.56.15:3306)
  Tue Aug 20 10:22:42 2019 - [info]   es3(192.168.56.16:3306)
  Tue Aug 20 10:22:42 2019 - [info] Alive Slaves:
  Tue Aug 20 10:22:42 2019 - [info]   es1(192.168.56.14:3306)  Version=5.7.24-log (oldest major version between slaves) log-bin:enabled
  Tue Aug 20 10:22:42 2019 - [info]     GTID ON
  Tue Aug 20 10:22:42 2019 - [info]     Replicating from es3(192.168.56.16:3306)
  Tue Aug 20 10:22:42 2019 - [info]   es2(192.168.56.15:3306)  Version=5.7.24-log (oldest major version between slaves) log-bin:enabled
  Tue Aug 20 10:22:42 2019 - [info]     GTID ON
  Tue Aug 20 10:22:42 2019 - [info]     Replicating from 192.168.56.16(192.168.56.16:3306)
  Tue Aug 20 10:22:42 2019 - [info] Current Alive Master: es3(192.168.56.16:3306)
  Tue Aug 20 10:22:42 2019 - [info] Checking slave configurations..
  Tue Aug 20 10:22:42 2019 - [info]  read_only=1 is not set on slave es2(192.168.56.15:3306).
  Tue Aug 20 10:22:42 2019 - [info] Checking replication filtering settings..
  Tue Aug 20 10:22:42 2019 - [info]  binlog_do_db= , binlog_ignore_db=
  Tue Aug 20 10:22:42 2019 - [info]  Replication filtering check ok.
  Tue Aug 20 10:22:42 2019 - [info] GTID (with auto-pos) is supported. Skipping all SSH and Node package checking.
  Tue Aug 20 10:22:42 2019 - [info] Checking SSH publickey authentication settings on the current master..
  Tue Aug 20 10:22:43 2019 - [info] HealthCheck: SSH to es3 is reachable.
  Tue Aug 20 10:22:43 2019 - [info]
  es3(192.168.56.16:3306) (current master)
   +--es1(192.168.56.14:3306)
   +--es2(192.168.56.15:3306)
 
  Tue Aug 20 10:22:43 2019 - [info] Checking replication health on es1..
  Tue Aug 20 10:22:43 2019 - [info]  ok.
  Tue Aug 20 10:22:43 2019 - [info] Checking replication health on es2..
  Tue Aug 20 10:22:43 2019 - [info]  ok.
  Tue Aug 20 10:22:43 2019 - [info] Checking master_ip_failover_script status:
  Tue Aug 20 10:22:43 2019 - [info]   /usr/local/bin/master_ip_failover --command=status --ssh_user=root --orig_master_host=es3 --orig_master_ip=192.168.56.16 --orig_master_port=3306
  
  ----- Failover Report -----
 
  app1: MySQL Master failover es3(192.168.56.16:3306) to es1(192.168.56.14:3306) succeeded
 
  Master es3(192.168.56.16:3306) is down!
 
  Check MHA Manager logs at es3 for details.
 
  Started automated(non-interactive) failover.
  Invalidated master IP address on es3(192.168.56.16:3306)
  Power off es3.
  Selected es1(192.168.56.14:3306) as a new master.
  es1(192.168.56.14:3306): OK: Applying all logs succeeded.
  es1(192.168.56.14:3306): OK: Activated master IP address.
  es2(192.168.56.15:3306): OK: Slave started, replicating from es1(192.168.56.14:3306)
  es1(192.168.56.14:3306): Resetting slave info succeeded.
  Master failover to es1(192.168.56.14:3306) completed successfully.
  Tue Aug 20 10:23:14 2019 - [info] Sending mail..
  [root@es3 ~]# ll
  2、遇到問題,缺省情況下,如果MHA檢測到連續(xù)發(fā)生宕機(jī),且兩次宕機(jī)時間間隔不足八小時的話,則不會進(jìn)行Failover,需要刪除最近時間的app1.failover.complete
 
   [error][/usr/share/perl5/vendor_perl/MHA/MasterFailover.pm, ln310] Last failover was done at 2019/08/20 10:23:14. Current time is too early to do failover again. If you want to do failover, manually remove /data/manager/app1.failover.complete and run this script again.
  Tue Aug 20 10:54:20 2019 - [error][/usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm, ln177] Got ERROR:  at /usr/bin/masterha_manager line 65.
  或者增加如下參數(shù)啟動
 
  --ignore_last_failover

(編輯:武林網(wǎng))

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 开鲁县| 内丘县| 南充市| 渭南市| 白山市| 调兵山市| 蒙自县| 泗水县| 鹤峰县| 灵川县| 遵义市| 酒泉市| 中西区| 阳原县| 溧水县| 崇礼县| 沐川县| 上杭县| 密云县| 陆丰市| 宁阳县| 托里县| 于都县| 正定县| 平阳县| 铅山县| 广昌县| 揭阳市| 泸定县| 华蓥市| 绵竹市| 米易县| 浏阳市| 长治市| 玉门市| 香格里拉县| 云林县| 湾仔区| 子长县| 天祝| 彭阳县|