国产欧美日韩第一页|日本一二三不卡视频|在线精品小视频,亚洲第一免费播放区,metcn人体亚洲一区,亚洲精品午夜视频

CentOS 6.5下MySQL MHA 報錯解決方法

2019-03-24 14:05:15 6342

安裝環(huán)境:CentOS 6.5 MySQL 5.7.22 MHA 0.56

1、找不到mysql 命令

Sat Mar 23 07:17:50 2019 - [info] Connecting to root@192.168.2.181(server2:22).. 
 Checking slave recovery environment settings..
 Opening /data/mysql/relay-log.info ... ok.
 Relay log found at /data/mysql, up to server2-relay-bin.000005
 Temporary relay log file is /data/mysql/server2-relay-bin.000005
 Testing mysql connection and privileges..sh: mysql: command not found
mysql command failed with rc 127:0!

解決辦法:找到MySQL 的安裝目錄,創(chuàng )建適當的軟鏈接

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

2、腳本文件沒(méi)有執行權限

Sat Mar 23 07:25:46 2019 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. Can't exec "/usr/local/bin/master_ip_failover": Permission denied at /usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm line 68.
Sat Mar 23 07:25:46 2019 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Sat Mar 23 07:25:46 2019 - [info] Got exit code 1 (Not master dead).

MySQL Replication Health is NOT OK!

解決辦法:賦權

chmod +x /usr/local/bin/master_ip_failover

3、master_ip_failover腳本錯誤

Sat Mar 23 07:27:44 2019 - [info] Checking master_ip_failover_script status:
Sat Mar 23 07:27:44 2019 - [info] /usr/local/bin/master_ip_failover --command=status --ssh_user=root --orig_master_host=server1 --orig_master_ip=192.168.32.180 --orig_master_port=3306 
/usr/local/bin/master_ip_failover: line 4: use: command not found
/usr/local/bin/master_ip_failover: line 6: use: command not found
/usr/local/bin/master_ip_failover: line 10: use: command not found
/usr/local/bin/master_ip_failover: line 14: syntax error near unexpected token `newline'
/usr/local/bin/master_ip_failover: line 14: `my ( '
Sat Mar 23 07:27:44 2019 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln226] Failed to get master_ip_failover_script status with return code 2:0.
Sat Mar 23 07:27:44 2019 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln424] Error happened on checking configurations. at /usr/bin/masterha_check_repl line 48
Sat Mar 23 07:27:44 2019 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln523] Error happened on monitoring servers.
Sat Mar 23 07:27:44 2019 - [info] Got exit code 1 (Not master dead).

解決辦法:#!/usr/bin/env perl要最頂行


提交成功!非常感謝您的反饋,我們會(huì )繼續努力做到更好!

這條文檔是否有幫助解決問(wèn)題?

非常抱歉未能幫助到您。為了給您提供更好的服務(wù),我們很需要您進(jìn)一步的反饋信息:

在文檔使用中是否遇到以下問(wèn)題:
-->