暂无图片
从库无法连接到主库,ERROR 2003 (HY000):111,5.7
我来答
分享
暂无图片 匿名用户
从库无法连接到主库,ERROR 2003 (HY000):111,5.7

100.29--主

100.40--从

主上操作


mysql> create user 'repl'@'192.168.100.40' identified by 'repl123';
Query OK, 0 rows affected (0.11 sec)

mysql> grant replication slave on *.* to 'repl'@'192.168.100.40';
Query OK, 0 rows affected (0.00 sec)

再从上


[root@pg40 ~]# mysql -h 192.168.100.29 -urepl -prepl123
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.100.29' (111)


[root@pgdan ~]# systemctl status firewalld.service
鈼firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)

ping 100.29 100.40都没问题,防火墙也关闭,

请问怎么解决和排查


mysql-5.7 ---社区版

我来答
添加附件
收藏
分享
问题补充
3条回答
默认
最新
D
D-将军

  • 先telnet 看看端口是否通,
暂无图片 评论
暂无图片 有用 0
test

'repl'@'192.168.100.40 改为'repl'@'%'试下

暂无图片 评论
暂无图片 有用 0
fxjian0829

从你的操作上来看,没刷新权限表诶。

mysql> flush privileges;

希望对你有帮助

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏