Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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 '14 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 '14 at 19:54
Listening on 3306 on both servers. – drautskis Feb 24 '14 at 19:58
And IP on both? – Tero Kilkanen Feb 24 '14 at 20:02
Yep, – drautskis Feb 24 '14 at 20:13

Your Answer


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.