MySQL主从 Slave_IO_Running: Connecting

网上说了很多方法,都有各自的解决场景。但是我这个比较特殊。找了好久没发现原因。最后终于找到了

查看错误信息很重要,之前没注意到,其实人家MySQL把错误信息给你了。

错误代码:

#没有指定master的端口号,就会默认是3306
CHANGE MASTER to master_host='127.0.0.1',
master_user='mysqlsync',
master_password='123456',
master_log_file='mysql-bin.000001',master_log_pos=156;

加上端口号【master_port=3307,】改了一下就行了:

CHANGE MASTER to master_host='127.0.0.1',
master_port=3307,
master_user='mysqlsync',master_password='123456',
master_log_file='mysql-bin.000001',master_log_pos=156;

 

posted @ 2022-04-14 17:34  jiafeng  阅读(467)  评论(0编辑  收藏  举报