Mysql Master Master Replication

折月煮酒 提交于 2019-12-24 04:28:10

问题


Server1: xxx.xxx.xxx.xxx

server-id=1 
binlog-do-db=sample 
master-host = xxx.xxx.xxx.xxx 
master-user = someuser 
master-password = somepassword 
master-connect-retry = 60 
relay-log = /var/lib/mysql/slave-relay.log 
relay-log-index = /var/lib/mysql/slave-relay-log.index 

Server 2: xxx.xxx.xxx.xxx

server-id=2 
binlog-do-db = sample 
master-host = xxx.xxx.xxx.xxx 
master-user = someuser 
master-password = somepassword 
master-connect-retry = 60 
relay-log = /var/lib/mysql/slave-relay.log 
relay-log-index = /var/lib/mysql/slave-relay-log.index 

I have setup the master master replication configuration on 2 test servers, i have also opened ports for both the mysql 3306 on servers i am facing a problem with slave connection I keep getting the

following errors 101021 19:12:23 [ERROR] Slave I/O: error connecting to master 'root@xxx.xxx.xxx.xxx:3306' - retry-time: 60 retries: 86400, Error_code: 1045

Sever 1 has mysql 5.0.77 and server 2 has mysql version 5.1.41


回答1:


Error_code: 1045 means that there is a problem with your credentials.

Try to connect with your replication user credentials like :

mysql -h host -u your_user -p your_password

Note that the password is limited to 32 characters.



来源:https://stackoverflow.com/questions/3994475/mysql-master-master-replication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!