MHA常见问题

1、Can’t exec “mysqlbinlog”: No such file or directory at

Fri Aug 24 11:24:25 2018 - [info]   Connecting to root@192.168.2.63(192.168.2.63:22)..
Can't exec "mysqlbinlog": No such file or directory at /usr/local/share/perl5/MHA/BinlogManager.pm line 106. mysqlbinlog version command failed with rc 1:0, please verify PATH, LD_LIBRARY_PATH, and client options at /usr/local/bin/apply_diff_relay_logs line 493 
Fri Aug 24 11:24:25 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln208] Slaves settings check failed! 
Fri Aug 24 11:24:25 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln416] Slave configuration failed. 
Fri Aug 24 11:24:25 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations. at /etc/mha/mhamanager/bin/masterha_check_repl line 48 Fri Aug 24 11:24:25 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers. Fri Aug 24 11:24:25 2018 - [info] Got exit code 1 (Not master dead). 
MySQL Replication Health is NOT OK!

解决办法:

ln -s /usr/local/mysql/bin/mysqlbinlog  /usr/bin/mysqlbinlog

2、mysql command failed with rc 127:0!

Fri Aug 24 11:20:37 2018 - [info]   Connecting to root@192.168.2.63(192.168.2.63:22)..
  Checking slave recovery environment settings..
    Opening /mysql1/data/relay-log.info ... ok.
    Relay log found at /mysql1/data, up to node3-relay-bin.000002
    Temporary relay log file is /mysql1/data/node3-relay-bin.000002
    Testing mysql connection and privileges..sh: mysql: command not found
mysql command failed with rc 127:0!
 at /usr/local/bin/apply_diff_relay_logs line 375
        main::check() called at /usr/local/bin/apply_diff_relay_logs line 497
        eval {...} called at /usr/local/bin/apply_diff_relay_logs line 475
        main::main() called at /usr/local/bin/apply_diff_relay_logs line 120
Fri Aug 24 11:20:37 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln208] Slaves settings check failed!
Fri Aug 24 11:20:37 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln416] Slave configuration failed.
Fri Aug 24 11:20:37 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations.  at /etc/mha/mhamanager/bin/masterha_check_repl line 48
Fri Aug 24 11:20:37 2018 - [error][/usr/local/share/perl5/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.
Fri Aug 24 11:20:37 2018 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

解决办法:

ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值