接上篇文章,介绍了如何安装mysql mha,地址如下:http://blog.csdn.net/yiyuf/article/details/40340895

下面接着进行mha的相关测试:

SSH 信任关系检测:

[root@mha scripts]# masterha_check_ssh --conf=/etc/app1.cnf

Fri Oct 17 09:45:45 2014 - [info] Reading default configuration from /etc/masterha_default.cnf..

Fri Oct 17 09:45:45 2014 - [info] Reading application default configuration from /etc/app1.cnf..

Fri Oct 17 09:45:45 2014 - [info] Reading server configuration from /etc/app1.cnf..

Fri Oct 17 09:45:45 2014 - [info] Starting SSH connection tests..

Fri Oct 17 09:45:46 2014 - [debug]

Fri Oct 17 09:45:45 2014 - [debug]  Connecting via SSH from root@192.168.56.110(192.168.56.110:22) to root@192.168.56.113(192.168.56.113:22)..

Fri Oct 17 09:45:46 2014 - [debug]   ok.

Fri Oct 17 09:45:47 2014 - [debug]

Fri Oct 17 09:45:46 2014 - [debug]  Connecting via SSH from root@192.168.56.113(192.168.56.113:22) to root@192.168.56.110(192.168.56.110:22)..

Fri Oct 17 09:45:47 2014 - [debug]   ok.

Fri Oct 17 09:45:47 2014 - [info] All SSH connection tests passed successfully

[root@mha ~]# masterha_check_repl --conf=/etc/app1.cnf 
Tue Oct 21 11:06:59 2014 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Tue Oct 21 11:06:59 2014 - [info] Reading application default configuration from /etc/app1.cnf..
Tue Oct 21 11:06:59 2014 - [info] Reading server configuration from /etc/app1.cnf..
Tue Oct 21 11:06:59 2014 - [info] MHA::MasterMonitor version 0.56.
Tue Oct 21 11:07:00 2014 - [info] GTID failover mode = 0
Tue Oct 21 11:07:00 2014 - [info] Dead Servers:
Tue Oct 21 11:07:00 2014 - [info] Alive Servers:
Tue Oct 21 11:07:00 2014 - [info]   192.168.56.112(192.168.56.112:3306)
Tue Oct 21 11:07:00 2014 - [info]   192.168.56.110(192.168.56.110:3306)
Tue Oct 21 11:07:00 2014 - [info]   192.168.56.113(192.168.56.113:3306)
Tue Oct 21 11:07:00 2014 - [info] Alive Slaves:
Tue Oct 21 11:07:00 2014 - [info]   192.168.56.112(192.168.56.112:3306)  Version=5.5.40-36.1-log (oldest major version between slaves) log-bin:enabled
Tue Oct 21 11:07:00 2014 - [info]     Replicating from 192.168.56.110(192.168.56.110:3306)
Tue Oct 21 11:07:00 2014 - [info]     Primary candidate for the new Master (candidate_master is set)
Tue Oct 21 11:07:00 2014 - [info]   192.168.56.113(192.168.56.113:3306)  Version=5.6.21-69.0-log log-bin:enabled
Tue Oct 21 11:07:00 2014 - [info]     Replicating from 192.168.56.110(192.168.56.110:3306)
Tue Oct 21 11:07:00 2014 - [info]     Not candidate for the new Master (no_master is set)
Tue Oct 21 11:07:00 2014 - [info] Current Alive Master: 192.168.56.110(192.168.56.110:3306)
Tue Oct 21 11:07:00 2014 - [info] Checking slave configurations..
Tue Oct 21 11:07:00 2014 - [warning]  relay_log_purge=0 is not set on slave 192.168.56.112(192.168.56.112:3306).
Tue Oct 21 11:07:00 2014 - [info] Checking replication filtering settings..
Tue Oct 21 11:07:00 2014 - [info]  binlog_do_db= , binlog_ignore_db= 
Tue Oct 21 11:07:00 2014 - [info]  Replication filtering check ok.
Tue Oct 21 11:07:00 2014 - [info] GTID (with auto-pos) is not supported
Tue Oct 21 11:07:00 2014 - [info] Starting SSH connection tests..
Tue Oct 21 11:07:06 2014 - [info] All SSH connection tests passed successfully.
Tue Oct 21 11:07:06 2014 - [info] Checking MHA Node version..
Tue Oct 21 11:07:07 2014 - [info]  Version check ok.
Tue Oct 21 11:07:07 2014 - [info] Checking SSH publickey authentication settings on the current master..
Tue Oct 21 11:07:07 2014 - [info] HealthCheck: SSH to 192.168.56.110 is reachable.
Tue Oct 21 11:07:07 2014 - [info] Master MHA Node version is 0.56.
Tue Oct 21 11:07:07 2014 - [info] Checking recovery script configurations on 192.168.56.110(192.168.56.110:3306)..
Tue Oct 21 11:07:07 2014 - [info]   Executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/var/lib/mysql,/var/log/mysql --output_file=/var/log/masterha/app1/save_binary_logs_test --manager_version=0.56 --start_file=561103306-bin.000010 
Tue Oct 21 11:07:07 2014 - [info]   Connecting to root@192.168.56.110(192.168.56.110:22).. 
  Creating /var/log/masterha/app1 if not exists..    ok.
  Checking output directory is accessible or not..
   ok.
  Binlog found at /var/lib/mysql, up to 561103306-bin.000010
Tue Oct 21 11:07:08 2014 - [info] Binlog setting check done.
Tue Oct 21 11:07:08 2014 - [info] Checking SSH publickey authentication and checking recovery script configurations on all alive slave servers..
Tue Oct 21 11:07:08 2014 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='yyf' --slave_host=192.168.56.112 --slave_ip=192.168.56.112 --slave_port=3306 --workdir=/var/log/masterha/app1 --target_version=5.5.40-36.1-log --manager_version=0.56 --relay_log_info=/var/lib/mysql/relay-log.info  --relay_dir=/var/lib/mysql/  --slave_pass=xxx
Tue Oct 21 11:07:08 2014 - [info]   Connecting to root@192.168.56.112(192.168.56.112:22).. 
  Checking slave recovery environment settings..
    Opening /var/lib/mysql/relay-log.info ... ok.
    Relay log found at /var/lib/mysql, up to mysqld-relay-bin.000002
    Temporary relay log file is /var/lib/mysql/mysqld-relay-bin.000002
    Testing mysql connection and privileges.. done.
    Testing mysqlbinlog output.. done.
    Cleaning up test file(s).. done.
Tue Oct 21 11:07:08 2014 - [info]   Executing command : apply_diff_relay_logs --command=test --slave_user='yyf' --slave_host=192.168.56.113 --slave_ip=192.168.56.113 --slave_port=3306 --workdir=/var/log/masterha/app1 --target_version=5.6.21-69.0-log --manager_version=0.56 --relay_log_info=/var/lib/mysql/relay-log.info  --relay_dir=/var/lib/mysql/  --slave_pass=xxx
Tue Oct 21 11:07:08 2014 - [info]   Connecting to root@192.168.56.113(192.168.56.113:22).. 
  Checking slave recovery environment settings..
    Opening /var/lib/mysql/relay-log.info ... ok.
    Relay log found at /var/lib/mysql, up to mysqld-relay-bin.000002
    Temporary relay log file is /var/lib/mysql/mysqld-relay-bin.000002
    Testing mysql connection and privileges..Warning: Using a password on the command line interface can be insecure.
 done.
    Testing mysqlbinlog output.. done.
    Cleaning up test file(s).. done.
Tue Oct 21 11:07:17 2014 - [info] Slaves settings check done.
Tue Oct 21 11:07:17 2014 - [info] 
192.168.56.110(192.168.56.110:3306) (current master)
 +--192.168.56.112(192.168.56.112:3306)
 +--192.168.56.113(192.168.56.113:3306)
Tue Oct 21 11:07:17 2014 - [info] Checking replication health on 192.168.56.112..
Tue Oct 21 11:07:17 2014 - [info]  ok.
Tue Oct 21 11:07:17 2014 - [info] Checking replication health on 192.168.56.113..
Tue Oct 21 11:07:17 2014 - [info]  ok.
Tue Oct 21 11:07:17 2014 - [info] Checking master_ip_failover_script status:
Tue Oct 21 11:07:17 2014 - [info]   /root/scripts/master_ip_failover.sh --command=status --ssh_user=root --orig_master_host=192.168.56.110 --orig_master_ip=192.168.56.110 --orig_master_port=3306 
IN SCRIPT TEST====/etc/init.d/keepalived stop==/etc/init.d/keepalived start===
Checking the Status of the script.. OK 
Tue Oct 21 11:07:17 2014 - [info]  OK.
Tue Oct 21 11:07:17 2014 - [warning] shutdown_script is not defined.
Tue Oct 21 11:07:17 2014 - [info] Got exit code 0 (Not master dead).
MySQL Replication Health is OK.

MySQL MHA相关测试的更多相关文章

  1. MySQL MHA+Keepalived

    一.MHA的简单介绍MHA是由perl语言编写的,用外挂脚本的方式实现mysql主从复制的高可用性.MHA可以自动检测mysql是否宕机,如果宕机,在10-30s内完成new master的选举,应用 ...

  2. MYSQL MHA

    MYSQL MHA 简介: MHA(Master High Availability)目前在MySQL高可用方面是一个相对成熟的解决方案,它由日本DeNA公司youshimaton(现就职于 Face ...

  3. 搭建MySQL MHA高可用

    本文内容参考:http://www.ttlsa.com/mysql/step-one-by-one-deploy-mysql-mha-cluster/ MySQL MHA 高可用集群 环境: Linu ...

  4. CENTOS6.6 下mysql MHA架构搭建

    本文来自我的github pages博客http://galengao.github.io/ 即www.gaohuirong.cn 摘要: 本篇是自己搭建的一篇mysql MHA文章 前面的安装步骤基 ...

  5. mysql MHA架构搭建过程

    [环境介绍] 系统环境:Red Hat Enterprise Linux 7 + 5.7.18 + MHA version 0.57 系统 IP 主机名 备注 版本 xx系统 192.168.142. ...

  6. CentOS6.8下MySQL MHA架构搭建笔记

    转载请注明出处,本文地址:http://www.cnblogs.com/ajiangg/p/6552855.html 以下是CentOS6.8下MySQL MHA架构搭建笔记 IP资源规划: 192. ...

  7. MySQL MHA 搭建&测试(环境:CentOS7 + MySQL5.7.23)

    MySQL MHA架构介绍: MHA(Master High Availability)目前在MySQL高可用方面是一个相对成熟的解决方案,它由日本DeNA公司youshimaton(现就职于Face ...

  8. 基于Docker Compose构建的MySQL MHA集群

    Docker MySQL MHA 基于Docker 1.13.1之上构建的MySQL MHA Docker Compose Project 可快速启动GTID模式下的MasterHA集群, 主用于My ...

  9. 基于MySQL+MHA+Haproxy部署高可用负载均衡集群

    一.MHA 概述 MHA(Master High Availability)是可以在MySQL上使用的一套高可用方案.所编写的语言为Perl 从名字上我们可以看到.MHA的目的就是为了维护Master ...

随机推荐

  1. css3新增的属性 - 分享

    CSS3新增属性   一.transform变换效果 CSS3 提供了元素变形效果,也叫做变换.它可以将元素实现旋转.缩放和平移的功能. 属性有两个:transform 和 transform-ori ...

  2. 让VirtualBox虚拟机实现开机自动后台运行

    转至:http://www.cnblogs.com/top5/archive/2012/01/19/2326234.html 测试环境:Host OS: Windows 7 x64 Guest OS: ...

  3. vue2.X 与 vue1.X 的区别

    vue2.0: bower info vue http://vuejs.org/ 到了2.0以后,有哪些变化? 1. 在每个组件模板,不在支持片段代码 组件中模板: 之前: <template& ...

  4. 移动端调试 — chrome模拟器基础调试

    打开开发者工具,进入chrome调试状态,点击左上角的手机图标,进入手机模拟器调试状态. 模拟器支持操作: 切换设备类型,模拟网络环境,模拟bar,keyboard弹出状态,横屏状态,更改UserAg ...

  5. 匿名函数 sorted() filter() map() 递归函数

    一. lambda() 匿名函数   说白了,从字面理解匿名函数就是看不见的函数,那么他的看不见表现在哪里呢? 其实就是在查询的时候他们的类型都是lambda的类型所以叫匿名,只要是用匿名函数写的大家 ...

  6. vue搭建项目之设置代理

    前面将项目页面.axios.组件等都准备好了,现在就差设置代理了: 首先在config下新建两个文件,分别叫做dev.uri.js和prod.uri.js,代码为: module.exports = ...

  7. python实现堆栈与队列的方法

    python实现堆栈与队列的方法 本文实例讲述了python实现堆栈与队列的方法.分享给大家供大家参考.具体分析如下: 1.python实现堆栈,可先将Stack类写入文件stack.py,在其它程序 ...

  8. 使用Xmanager远程CentOS 7服务器(XDMCP)

    0. 前言 基本概念 简略概述 Display Manager 提供登录需求 在文字界面下可以通过startx来启动Xwindows 在runlevel 5下,在tty7处有可以使用的图形登录界面(方 ...

  9. Centos7.2命令安装图形化界面

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/liang_operations/arti ...

  10. RSA - 原理、特点(加解密及签名验签)及公钥和私钥的生成

    Wiki - RSA加密演算法 Wiki - 欧拉函数 Wiki - 模反元素 ASN.1 格式标准 RSA算法原理(二) 注意: RSA 加密或签名后的结果是不可读的二进制,使用时经常会转为 BAS ...