2

Trying to setup MySQL Replication using this guide here : http://wpguru.co.uk/2013/05/how-to-setup-mysql-masterslave-replication-with-existing-data/ I was able to do this on two random VMs running the same version of MySQL and it worked perfectly fine. I am trying to do this in a production environment and it doesn't seem to be working. The Slave is unable to connect to the master even though I can connect just fine using the mysql client.

140821 11:53:11 [ERROR] Slave I/O: error connecting to master 'repl@<host-ip>:7' - retry-time: 3306  retries: 86400, Error_code: 2003

The Slave is running 5.5.38-0ubuntu0.14.04.1 and the Master Server is running 5.5.34-0ubuntu0.12.04.1-log. I can telnet from the slave to the master. I can also connect using mysql -u repl -p -h <master-host-ip> just fine. I am currently stuck at this point and out of ideas.

2
2

I found the problem. The slave was trying to connect to port 7 instead of port 3306 for some reason. I had to manually specify that as part of CHANGE MASTER TO command and add MASTER_PORT=3306 and it works perfectly now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.