MHA安装配置(十三)

2015-11-21 01:45:21 · 作者: · 浏览: 34
n between slaves) log-bin:enabled Thu Jul 23 15:29:39 2015 - [info] Replicating from 192.168.8.6(192.168.8.6:3306) It is better to execute FLUSH NO_WRITE_TO_BINLOG TABLES on the master before switching. Is it ok to execute on mysql-mha01(192.168.8.6:3306)? (YES/no): yes Thu Jul 23 15:29:41 2015 - [info] Executing FLUSH NO_WRITE_TO_BINLOG TABLES. This may take long time.. Thu Jul 23 15:29:41 2015 - [info] ok. Thu Jul 23 15:29:41 2015 - [info] Checking MHA is not monitoring or doing failover.. Thu Jul 23 15:29:41 2015 - [info] Checking replication health on mysql-mha02.. Thu Jul 23 15:29:41 2015 - [info] ok. Thu Jul 23 15:29:41 2015 - [info] Checking replication health on mysql-mha03.. Thu Jul 23 15:29:41 2015 - [info] ok. Thu Jul 23 15:29:41 2015 - [info] Searching new master from slaves.. Thu Jul 23 15:29:41 2015 - [info] Candidate masters from the configuration file: Thu Jul 23 15:29:41 2015 - [info] Non-candidate masters: Thu Jul 23 15:29:41 2015 - [info] From: mysql-mha01(192.168.8.6:3306) (current master) +--mysql-mha02(192.168.8.7:3306) +--mysql-mha03(192.168.8.8:3306) To: mysql-mha02(192.168.8.7:3306) (new master) +--mysql-mha03(192.168.8.8:3306) Starting master switch from mysql-mha01(192.168.8.6:3306) to mysql-mha02(192.168.8.7:3306)? (yes/NO): yes Thu Jul 23 15:29:48 2015 - [info] Checking whether mysql-mha02(192.168.8.7:3306) is ok for the new master.. Thu Jul 23 15:29:48 2015 - [info] ok. Thu Jul 23 15:29:48 2015 - [info] ** Phase 1: Configuration Check Phase completed. Thu Jul 23 15:29:48 2015 - [info] Thu Jul 23 15:29:48 2015 - [info] * Phase 2: Rejecting updates Phase.. Thu Jul 23 15:29:48 2015 - [info] master_ip_online_change_script is not defined.
If you do not disable writes on the current master manually, applications keep writing on the current master. Is it ok to proceed? (yes/NO): yes Thu Jul 23 15:29:59 2015 - [info] Locking all tables on the orig master to reject updates from everybody (including root): Thu Jul 23 15:29:59 2015 - [info] Executing FLUSH TABLES WITH READ LOCK.. Thu Jul 23 15:29:59 2015 - [info] ok. Thu Jul 23 15:29:59 2015 - [info] Orig master binlog:pos is mysql-bin.000014:107. Thu Jul 23 15:29:59 2015 - [info] Waiting to execute all relay logs on mysql-mha02(192.168.8.7:3306).. Thu Jul 23 15:29:59 2015 - [info] master_pos_wait(mysql-bin.000014:107) completed on mysql-mha02(192.168.8.7:3306). Executed 0 events. Thu Jul 23 15:29:59 2015 - [info] done. Thu Jul 23 15:29:59 2015 - [info] Getting new master's binlog name and position.. Thu Jul 23 15:29:59 2015 - [info] mysql-bin.000015:107 Thu Jul 23 15:29:59 2015 - [info] All other slaves should start replication from here. Statement should be: CHANGE MASTER TO MASTER_HOST='mysql-mha02 or 192.168.8.7', MASTER_PORT=3306, MASTER_LOG_FILE='mysql-bin.000015', MASTER_LOG_POS=107, MASTER_USER='repl', MASTER_PASSWORD='xxx'; Thu Jul 23 15:29:59 2015 - [info] Thu Jul 23 15:29:59 2015 - [info] * Switching slaves in parallel.. Thu Jul 23 15:29:59 2015 - [info] Thu Jul 23 15:29:59 2015 - [info] -- Slave switch on host mysql-mha03(192.168.8.8:3306) started, pid: 6819 Thu Jul 23 15:29:59 2015 - [info] Thu Jul 23 15:29:59 2015 - [info] Log messages from mysql-mha03 ... Thu Jul 23 15:29:59 2015 - [info] Thu Jul 23 15:29:59 2015 - [info] Waiting to execute all relay logs on mysql-mha03(192.168.8.8:3306).. Thu Jul 23 15:29:59 2015 - [info] master_pos_wait(mysql-bin.000014:1