3

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

OMG Ponies
  • 300,587
  • 73
  • 490
  • 482
user160108
  • 922
  • 3
  • 8
  • 35
  • What happens when you `telnet xxx.xxx.xxx.xxx 3306` from one server to another? Also, you'll want to set up autoincrement offsets. – ceejayoz May 22 '11 at 23:47

1 Answers1

6

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.

TheCodeArtist
  • 19,131
  • 3
  • 60
  • 123
  • You sir saved my life. I've been searching for _hours_ why on earth my replication did not work. Turns out my password was 50 chars long… I **HATE** MySQL more than ever now (never liked it anyway… PostGres FTW!) – Frizlab Feb 08 '14 at 07:40
  • F*ck, I have spent 2 hours of my life, retried whole process from the beginning few times... Thank you! – Bogdan Burym Jul 20 '15 at 10:53