码迷,mamicode.com
首页 > 数据库 > 详细

mysql健康检查常见故障

时间:2020-01-14 10:11:10      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:str   cal   root   with   nec   命令   can   strong   path   

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   //注释掉此行代码

mysql健康检查常见故障

标签:str   cal   root   with   nec   命令   can   strong   path   

原文地址:https://blog.51cto.com/14557736/2466480

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!