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

I have a mysql server which is accessed locally by several computers on the network through a static ip at 192.168.1.# . I need the mysql server to be accessed from our web servers so that I can run data syncs via the website backend. I have setup a dyndns address to follow the public ip of our network, and configured the firewall to port forward the port of our router to the mysql server. This is working correctly, as I was seeing the access requests getting stopped by my shorewall rules on the mysql server machine. If I remove all the firewall protection (temporarily) on the mysql server machine to test that I can access the machine properly, I still cannot access it, the connection just times out. I don't know what else I would need to set on the mysql server to allow for this access.

My mysql user table allows for my user to access the db from any host. My my.cnf file sets the mysqld to bind-address=192.168.1.# and disables skip-networking

I've been working and searching for a fix for several days. Any help, links, or suggestions would be greatly appreciated.

If any other info would be helpful, I'd be happy to provide anything to get this working today. Thanks for looking and hopefully the assistance.

share|improve this question
    
you need a vpn connection to your LAN. After that you can connect to your DB host. –  ott-- Jan 9 '12 at 22:07
    
Another option instead of accessing from remote could be replication from local to remote. –  ott-- Jun 19 '12 at 17:15

3 Answers 3

Side note: for the love of merlin's beard - Make sure you use SSL or stunnel

share|improve this answer

If the connection times out it will not be the MySQL settings.

What router and firewall are you using?

Are you sure the NAT is configured properly? Is the MySQL server able to route to the router?

share|improve this answer

I would not bind mysql to an ip address. Do you want to be able to access it locally as well? If so, then comment out bind-address.

Next from another local machine, type:

nmap mysqlserveripaddress

where mysqlserveripaddress is the ip address of your mysql server. If pot 3306 or mysql is open, then you are ready to trouble shot your router(NAT/FW) settings.

share|improve this answer

Your Answer

 
discard

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