masterha_check_repl --conf=/etc/masterha/app1.cnf的各种报错及解决方法

masterha_check_repl --conf=/etc/masterha/app1.cnf的各种报错及解决方法

 

1、错误:User repl does not exist or does not have REPLICATION SLAVE privilege! Other slaves can not start replication from this host

解决方法:具有复制权限的用户(repl)必须在所有节点上都创建一次,具有管理权限的用户也是一样

 

2、错误:Master setting check failed!以及Master configuration failed.

解决方法:如果手动定义了二进制日志文件的路径,就必须在mha的配置文件中制定master_binlog_dir=二进制日志文件所在目录

 

3、错误:Failed to get master_ip_failover_script status with return code 255:0.

解决方法:网上的说法是Failover两种方式:一种是虚拟IP地址,一种是全局配置文件。MHA并没有限定使用哪一种方式,而是让用户自己选择,虚拟IP地址的方式会牵扯到其它的软件,比如keepalive软件,而且还要修改脚本master_ip_failover。所以这里暂时把 app1.cnf内容的master_ip_failover_script= /usr/local/bin/master_ip_failover这一项注释掉。

 

4、ERROR 1129 (HY000): Host '192.168.1.24' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

解决方法:刷新报错的host文件(哪个机器出错就在该机器上刷新,此处是192.168.1.24)

mysqladmin -uroot flush-hosts

 

 

 

5、Multi-master configuration is detected, but two or more masters are either writable (read-only is not set) or dead! Check configurations for details. Master configurations are as below:

 

解决方法:从服务器set global read_only=1;

 

 

 

 

 

 

  • 4
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Master configuration Find the my.cnf file Configure under [mysqld] [mysqld] server-id=1 log-bin=master-bin   Restart the service and log in to mysql Create a user to obtain the log file. mysql> CREATE USER 'sree'@'%' IDENTIFIED BY 'sree' Grant relevant permissions (copy permissions) *.* represents all tables in all libraries mysql> grant replication slave on *.* to 'sree'@'%'   Refresh permissions mysql> flush privileges mysql> show master status; | File | Position | master-bin.000004 | 120                      Slave configuration ==================== Modify the configuration file: Configure under [mysqld] [mysqld] server-id=2 #As long as it is different from the above.   Then log in to mysql mysql>  CHANGE MASTER TO     MASTER_LOG_FILE='master-bin.000004 ', #above file        MASTER_LOG_POS = 120 ; #The above position        MASTER_HOST='192.168.249.130', #The ip address of the main library         MASTER_USER = 'sree',         MASTER_PASSWORD = 'sree',  Then start slave ============ mysql> show slave status\G; see: ===  Slave_IO_Running: Yes  Slave_SQL_Running: Yes It means that it was successful.     Errors in the whole process: Slave_IO_Running: Connecting 1. Mine is the wrong host ip. 2. There are still some firewalls on the Internet that are not turned off I use centos7 to turn off the firewall: systemctl stop firewalld 3. There is also a mistake in the above-mentioned secret.   Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs This error generally occur when we clone the master to slaver. Delete auto.cnf of mysql, and then restart the service.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值