Mha报错Checking slave status failed on
作者:互联网
报错信息如下:
error][/usr/share/perl5/vendor_perl/MHA/Server.pm, ln265] Checking slave status failed on 192.168.31.18(192.168.31.18:3306). err=Got error when executing SHOW SLAVE STATUS. Access denied; you need (at least one of) the SUPER, REPLICATION CLIENT privilege(s) for this operation
Tue Sep 7 00:31:39 2021 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln427] Error happened on checking configurations. at /usr/share/perl5/vendor_perl/MHA/ServerManager.pm line 315.
Tue Sep 7 00:31:39 2021 - [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln525] Error happened on monitoring servers.
Tue Sep 7 00:31:39 2021 - [info] Got exit code 1 (Not master dead).
原因:
/etc/mastermha/app1.cnf文件中
user=mhauser
在做此用户授权时出错.造成无法连接数据库检查状态
解决方法
此用户需要UPER, REPLICATION CLIENT 权限.最简单的方法就是赋予所有权限,次方法生产环境下需要谨慎.
grant all on *.* to repluser@'192.168.31.%';
结果:
标签:status,slave,31,MHA,perl5,报错,error,vendor,perl 来源: https://blog.csdn.net/qq_29974229/article/details/120155663