#解决办法:
vim /etc/my.cnf
[mysqld]#mysql5.6
skip-name-resolve
skip-name-resolv
#mysql5.7
skip_name_resolve
/etc/init.d/mysqld restart
#碰到这个问题,是因为创建私钥公钥的问题, 解决办法:
[root@node1 .ssh]# cd /root/.ssh/
[root@node1 .ssh]# rm -rf *
然后重新创建私钥公钥
#在主节点的mysql 内添加:
grant replication slave on *.* to rep@'%' identified by '123';
CHANGE MASTER TO MASTER_HOST='10.0.0.51', MASTER_PORT=3306, MASTER_LOG_FILE='mysql-bin.000008', MASTER_LOG_POS=120, MASTER_USER='rep', MASTER_PASSWORD='xxx';
####碰到这样的问题说明, 50设置的slave指向51 但是51slave设置的slave又指向了50 这样来回指向就会出现这个的错误,
#解决办法就是:
找其中一台mysql输入: stop slave; reset slave;