Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have read a couple of tutorials on setting up database replication on MySQL, but I have not got it working yet. I think the problem is that my machine can't connect to another. For example, I can't connect to my ip:80 even though I have HTTPD running. It's just all blocked. I tried using Hamachi to setup a home network to get replication to work but no luck. Do you have any ideas how to make home group IPs that I could use as slave / master IPs?

share|improve this question
    
Smells like firewall problems. There really isn't enough information here to make a diagnosis. –  womble Jul 5 '09 at 11:41

2 Answers 2

up vote 2 down vote accepted

You cannot do anything with MYSQL here until you resolve your connectivity issues, you need to be able to communicate between both machines on port 3306 (or whatever your MYSQL port is if you have changed it), once you can do that you can start looking at replication.

You don't say how your machines are configured, are they in the same building, is one at home and one at work, are they on the same network? If there on separate networks and you are not able to get the firewalls opened up for that port, you are going to need to look at using something like a VPN to connect the 2, if you are able to do that.

For two machines on the same network the first thing I would do is disable the windows firewall on both machines and see if communication works, if it does you know its related to the firewall. Once thats done you can turn the firewall back on and add exceptions to it for MYSQL, usually port 3306.

share|improve this answer
    
I just want to test replication how it works on my web application. I have two PCs at home as well as one laptop. They are all connected to the same router and when I go to Network folder in Windows I can see the computers but I can't connect to them. I don't have any firewalls except for Windows Firewall. –  rFactor Jul 5 '09 at 12:38
    
maybe then it's your windows firewall - open port 3306, also make sure mysql actually listens on network interface, not just on loopback [ bind-address in my.cnf, should be bind-address= [ empty or just commented out ]] –  pQd Jul 5 '09 at 13:07
    
I second this answer. Can you connect to either of the machines from outside using a mysql client? To test basic connectivity, log onto MachineA, open a command prompt, and type "telnet MachineB 3306". If you get connected it's not a firewall problem. If you don't, it probably is. Don't forget to fix it on both machines, not just one. –  user10501 Jul 5 '09 at 13:51

firewall problem indeed, but maybe you have at least ssh connectivity between them? or maybe both sql servers can establish connection to some 3rd host that will rely the traffic [ via vpn or ssh tunnel ]

share|improve this answer
    
Yes Hamachi is a VPN tool and I tried to use it, but I'm not even sure if it worked... how do I know whether it's a configuration issue of replication setup or a connectivity issue? –  rFactor Jul 5 '09 at 12:40
    
@KS maybe try to talk with those who are in charge of network - i think it'll be easier this way. –  pQd Jul 5 '09 at 12:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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