I am trying to do Master to Master Replication in Windows Server 2008. I am successfully able to replicate all the database of Master 1 to Master 2. But I am unable to replicate the changes made on Master 2 to Master 1. Later on I found that, I can telnet to Master 1 from Master 2 with port 3306 but I am not able on telnet from Master 1 to Master 2.
When I check netstat on both Master. I found the following result. I couldn't publish my public IP so I put name as Master 1 and Master 2 for their respective IP
Master 1
C:\Users\XXXXX>netstat
Active Connections
Proto Local Address Foreign Address State
TCP Master 1:3306 Master 2:61566 ESTABLISHED
TCP Master 1:3389 My remote:56053 ESTABLISHED
TCP 127.0.0.1:3306 Master 1:60675 ESTABLISHED
TCP 127.0.0.1:3306 Master 1:60712 ESTABLISHED
TCP 127.0.0.1:60675 Master 1:3306 ESTABLISHED
TCP 127.0.0.1:60712 Master 1:3306 ESTABLISHED
Master 2
C:\Users\XXXX>netstat
Active Connections
Proto Local Address Foreign Address State
TCP Master 2:3389 My remote:56124 ESTABLISHED
TCP Master 2:61566 Master 1:3306 ESTABLISHED
TCP Master 2:61574 bil-sc-cm02:http ESTABLISHED
TCP 127.0.0.1:3306 Master 2:61562 ESTABLISHED
TCP 127.0.0.1:3306 Master 2:61563 ESTABLISHED
TCP 127.0.0.1:61562 Master 2:3306 ESTABLISHED
TCP 127.0.0.1:61563 Master 2:3306 ESTABLISHED
TCP 127.0.0.1:61573 Master 2:3306 TIME_WAIT
All shows that In my master 2, port 3306 is not activate. Now I need solution over here. How can I figure it. Your small suggestion would be million for me.
Thank you
Regards,
Udhyan
Best Answer
"Telnet" just means you can establish a TCP connection. Don't focus that much on it.
The more important information is in your netstat output. As you can see, the MySQL process on Master2 is only listening on 127.0.0.1, not on the "Master 2" interface. You will need to configure MySQL to listen to that interface.
On Linux systems, you would edit /etc/my.cnf and change the
bind-address
parameter to something other than127.0.0.1
and restart MySQL. I'm unfamiliar with how to do this on Windows, but there should be a similar way to change this parameter (maybe through an admin GUI?).