7、测试MHA
?
关闭node1:
[root@zbdba2 database]# service mysql stop
Shutting down MySQL... SUCCESS!
跟踪manager日志:
?
Wed Feb 11 02:16:49 2015 - [warning] Got error on MySQL select ping: 2006 (MySQL server has gone away) Wed Feb 11 02:16:49 2015 - [info] Executing SSH check script: save_binary_logs --command=test --start_pos=4 --binlog_dir=/var/lib/mysql --output_file=/var/tmp/save_binary_logs_test --manager_version=0.56 --binlog_prefix=mysql-bin Wed Feb 11 02:16:49 2015 - [info] HealthCheck: SSH to 192.168.56.161 is reachable. Wed Feb 11 02:16:50 2015 - [warning] Got error on MySQL connect: 2013 (Lost connection to MySQL server at 'reading initial communication packet', system error: 111) Wed Feb 11 02:16:50 2015 - [warning] Connection failed 2 time(s).. Wed Feb 11 02:16:51 2015 - [warning] Got error on MySQL connect: 2013 (Lost connection to MySQL server at 'reading initial communication packet', system error: 111) Wed Feb 11 02:16:51 2015 - [warning] Connection failed 3 time(s).. Wed Feb 11 02:16:52 2015 - [warning] Got error on MySQL connect: 2013 (Lost connection to MySQL server at 'reading initial communication packet', system error: 111) Wed Feb 11 02:16:52 2015 - [warning] Connection failed 4 time(s).. Wed Feb 11 02:16:52 2015 - [warning] Master is not reachable from health checker! Wed Feb 11 02:16:52 2015 - [warning] Master 192.168.56.161(192.168.56.161:3306) is not reachable! Wed Feb 11 02:16:52 2015 - [warning] SSH is reachable. Wed Feb 11 02:16:52 2015 - [info] Connecting to a master server failed. Reading configuration file /etc/masterha_default.cnf and /etc/masterha/app1.cnf again, and trying to connect to all servers to check server status.. Wed Feb 11 02:16:52 2015 - [warning