mysql 主从复制问题整理
问题:
1045 | error connecting to master 'slave_user@192.168.0.75:3306' - retry-time: 6
原因:
其实是MySQL的验证没有通过
解决:
主要是主从服务器上的密码不正确导致。需要检查master和slave中的配置,
master
GRANT REPLICATION SLAVE ON *.* TO 'slave_user'@'%' IDENTIFIED BY '123456';
slave
CHANGE MASTER TO MASTER_HOST='192.168.0.75',MASTER_USER='slave_user', MASTER_PASSWORD='123456', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS= 107;
详细可查看