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.

Where I work, we have a single development server, and a single production server that we manage on-site. When I try to connect remotely to the MySQL on the development server, I get this error:

ERROR 2003 (HY000): Can't connect to MySQL server on '***' (113)

However, I can successfully connect remotely to MySQL on the production server.

Both servers have identical configuration files. (/etc/my.cnf)

nmap -p 3306 server-name shows that port 3306 is open on production, but closed on development, but iptables -L -n shows the same rules on both servers, and neither of them have a rule at all for port 3306.

I don't know much about iptables, so I'm wondering how it's possible that port 3306 is open on production, but there isn't a rule for it. Can anyone help me understand what it happening here?

(I've also verified that the MySQL user I'm using is allowed to connect from any host.)

share|improve this question

1 Answer 1

Your development server MySQL could be bound to the localhost interface, not all interfaces on the server. Check the development server bind-address option in MySQL config.

share|improve this answer
    
The MySQL config file doesn't have a bind-address option specified. Both servers have identical config files, and I can connect to the production server, so I don't think that MySQL config is the problem. –  drautskis Feb 24 at 19:50
    
Check the output of netstat -lnp | grep mysql as root user to see what addresses MySQL is listening to. –  Tero Kilkanen Feb 24 at 19:54
    
Listening on 3306 on both servers. –  drautskis Feb 24 at 19:58
    
And IP 0.0.0.0 on both? –  Tero Kilkanen Feb 24 at 20:02
    
Yep, 0.0.0.0:3306 –  drautskis Feb 24 at 20:13

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.