1、无法找到mysqlbinlog命令报错
Can't exec "mysqlbinlog": 没有那个文件或目录 at /usr/local/share/perl5/MHA/BinlogManager.pm line 106.
解决办法
在mysql主从服务器创建mysqlbinlog软链接
ln -s /usr/local/mysql/bin/mysqlbinlog /usr/sbin/
2、无法找到mysql命令报错
Sun Jan 12 19:33:33 2020 - [info] Connecting to root@192.168.150.158(192.168.150.158:22)..
Checking slave recovery environment settings..
Opening /home/mysql/relay-log.info ... ok.
Relay log found at /home/mysql, up to relay-log-bin.000002
Temporary relay log file is /home/mysql/relay-log-bin.000002
Testing mysql connection and privileges..sh: mysql: 未找到命令
mysql command failed with rc 127:0!
解决办法
在mysql主从服务器创建mysql软链接
ln -s /usr/local/mysql/bin/mysql /usr/sbin/
3、字符集报警(mysql-5.7版本报警)
mysqlbinlog: unknown variable 'default-character-set=utf8'
mysqlbinlog version command failed with rc 7:0, please verify PATH, LD_LIBRARY_PATH, and client options
解决办法
从服务器一定要在主配置文件my.cnf内的client段把 utf-8 这行注释掉
[client]
#default-character-set=utf8 //注释掉此行代码