zhancat200801 发表于 2016-09-06 10:15

MHA报错问题:User repl does not exist or does not have REPLICATION SLAVE priv...

本帖最后由 zhancat200801 于 2016-09-06 10:17 编辑

在做MHA配置并测试的时候,执行如下命令:


masterha_check_repl --conf=/etc/app1.cnf
报错如下:




# masterha_check_repl --conf=/etc/app1.cnf
Tue Sep6 01:31:11 2016 - Global configuration file /etc/masterha_default.cnf not found. Skipping.
Tue Sep6 01:31:11 2016 - Reading application default configuration from /etc/app1.cnf..
Tue Sep6 01:31:11 2016 - Reading server configuration from /etc/app1.cnf..
Tue Sep6 01:31:11 2016 - MHA::MasterMonitor version 0.56.
Tue Sep6 01:31:12 2016 - GTID failover mode = 1
Tue Sep6 01:31:12 2016 - Dead Servers:
Tue Sep6 01:31:12 2016 - Alive Servers:
Tue Sep6 01:31:12 2016 -    192.168.1.107(192.168.1.107:3306)
Tue Sep6 01:31:12 2016 -    192.168.1.111(192.168.1.111:3306)
Tue Sep6 01:31:12 2016 -    192.168.1.112(192.168.1.112:3306)
Tue Sep6 01:31:12 2016 - Alive Slaves:
Tue Sep6 01:31:12 2016 -    192.168.1.111(192.168.1.111:3306)Version=5.6.31-log (oldest major version between slaves) log-bin:enabled
Tue Sep6 01:31:12 2016 -    GTID ON
Tue Sep6 01:31:12 2016 -    Replicating from 192.168.1.107(192.168.1.107:3306)
Tue Sep6 01:31:12 2016 -    Primary candidate for the new Master (candidate_master is set)
Tue Sep6 01:31:12 2016 -    192.168.1.112(192.168.1.112:3306)Version=5.6.31-log (oldest major version between slaves) log-bin:enabled
Tue Sep6 01:31:12 2016 -    GTID ON
Tue Sep6 01:31:12 2016 -    Replicating from 192.168.1.107(192.168.1.107:3306)
Tue Sep6 01:31:12 2016 -    Not candidate for the new Master (no_master is set)
Tue Sep6 01:31:12 2016 - Current Alive Master: 192.168.1.107(192.168.1.107:3306)
Tue Sep6 01:31:12 2016 - Checking slave configurations..
Tue Sep6 01:31:12 2016 - Checking replication filtering settings..
Tue Sep6 01:31:12 2016 - binlog_do_db= , binlog_ignore_db=
Tue Sep6 01:31:12 2016 - Replication filtering check ok.
Tue Sep6 01:31:12 2016 - 192.168.1.111(192.168.1.111:3306): User repl does not exist or does not have REPLICATION SLAVE privilege! Other slaves can not start replication from this host.
Tue Sep6 01:31:12 2016 - Error happened on checking configurations.at /usr/local/share/perl5/MHA/ServerManager.pm line 1403
Tue Sep6 01:31:12 2016 - Error happened on monitoring servers.
Tue Sep6 01:31:12 2016 - Got exit code 1 (Not master dead).




MHA配置文件如下:





user=muser
ssh_user=root
password=654321
manager_workdir=/home/mysql_mha
manager_log=/var/log/masterha/mha.log
#远程服务器的工作目录
remote_workdir=/home/mysql_mha
ssh_user=root
repl_user=repl
repl_password=654321
ping_interval=1
master_binlog_dir=/var/log/mysql/binlog
#master_ip_failover_script=/usr/bin/master_ip_failover
secondary_check_script=/usr/local/bin/masterha_secondary_check -s 192.168.1.126 -s 192.168.1.11 -s 192.168.1.107


hostname=192.168.1.107
candidate_master=1


hostname=192.168.1.111
candidate_master=1


hostname=192.168.1.112
no_master=1
经过排查,网络、ssh联通性均没有问题,在master上检查授权也没有问题:


mysql> show grants for 'repl'@'%';
+-------------------------------------------------------------------------------------------------------------------------------------+
| Grants for repl@%                                                                                                                   |
+-------------------------------------------------------------------------------------------------------------------------------------+
| GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'repl'@'%' IDENTIFIED BY PASSWORD '*2A032F7C5BA932872F0F045E0CF6B53CF702F2C5' |
+-------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
权限检查没有问题,但报错明明是权限问题,太奇怪了,哪位高人帮忙排查一下,报错是什么原因?谢谢!
页: [1]
查看完整版本: MHA报错问题:User repl does not exist or does not have REPLICATION SLAVE priv...