国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 麻江县| 武邑县| 诸城市| 襄城县| 格尔木市| 漠河县| 西宁市| 安仁县| 泰来县| 阿图什市| 盐城市| 黄平县| 盐源县| 靖州| 神木县| 马山县| 陆丰市| 香格里拉县| 霍州市| 连云港市| 邢台县| 沂源县| 鄂伦春自治旗| 南漳县| 晋中市| 东平县| 金塔县| 寿阳县| 克东县| 辽阳县| 固镇县| 阳朔县| 深圳市| 油尖旺区| 郎溪县| 绵竹市| 奉化市| 遂昌县| 平远县| 北安市| 高要市|