MHA安装手记

   安装MHA服务器和客户端

# yum install perl-DBD-MySQL

    在manager节点上:

# yum install perl-DBD-MySQL
# yum install perl-Config-Tiny
# yum install perl-Log-Dispatch
# yum install perl-Parallel-ForkManager
# yum install -y rrdtool perl-rrdtool rrdtool-devel perl-Params-Validate

运行 masterha_check_repl --conf=/etc/masterha/app1.cnf 报错:
 Testing mysql connection and privileges..sh: mysql: command not found
找不到mysql命令,把你mysql安装的目录下的bin目录,做一个软链接就可以了
ln -s /usr/local/mysql/bin/mysql /usr/bin

运行masterha_check_repl --conf=/etc/masterha/app1.cnf 报错:
Can't exec "mysqlbinlog": 没有那个文件或目录 at /usr/share/perl5/vendor_perl/MHA/BinlogManager.pm line 106.

 在node节点上执行 which mysqlbinlog,比如我的结果就是

   [localhost~]$ which mysqlbinlog
   /usr/local/mysql/bin/mysqlbinlog

   需要做一个软连接

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

你可能感兴趣的:(MHA安装手记)