0

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

1 Answer 1

2

"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 than 127.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?).

8
  • Yeah in my "my.ini", there was nothing related with bind-address. But later on I have put bind-address as :: to allow all the IP address. Still it was not working. P.S: I have added server IP address in Bind-address also. And then when I restarted my MYSQL services, it doesn't work. Every blog tell me to change bindaddress. But there is nothing mentioned in bind-address. It is dim in current scenario. What could be other solution or alternative.
    – Udhy
    Oct 19, 2012 at 11:26
  • Any solution !!! Please help me
    – Udhy
    Oct 19, 2012 at 11:58
  • So, if the entry is missing, MySQL will default to localhost. To bind on all interfaces, add the line bind-address=0.0.0.0. This is from devside.net/guides/windows/mysql which matches what we would do on Linux.
    – cjc
    Oct 19, 2012 at 12:57
  • I have added bind-address=0.0.0.0 on both Master. But the result is same. Master 2 is replicating all the information of Master 1, but Master 1 is not replicating any information of Master 2. #For master configuration id server-id=1 #log-bin #ndb-nodeid=4 #ndbcluster #log-slave-updates #replicate-same-server-id = 0 auto-increment-increment = 2 auto-increment-offset = 1 log-bin=mysql-bin bind-address= 0.0.0.0 #report-host=server-name #skip-slave-start
    – Udhy
    Oct 19, 2012 at 13:26
  • Could it be some Windows permission on binding to the interface? Does the mysqld log say anything during startup?
    – cjc
    Oct 19, 2012 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .