Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Possible Duplicate:
How to setup a MySql server to accept remote connections?

I have a VPN with public and private subnets; I am considering only public subnet for now.

The node, I can ssh into it. Let's say I want to connect to MySQL on the node using its private address:

ubuntu@ip-10-0-0-23:/$ mysql -u root -h
ERROR 2003 (HY000): Can't connect to MySQL server on '' (111)

ubuntu@ip-10-0-0-23:/$ mysql -u root -h localhost
Welcome to the MySQL monitor.  Commands end with ; or \g.
--- 8< --- snip --- 8< --- 

The port 3306 is not reachable if I use the private IP?

My security group allows port 3306 inbound from AND from Outbound, allowed all. The generic setup done by Amazon through their wizard does not work... I add ACL that allows everything for everybody, still does not work.

What am I missing?

share|improve this question

marked as duplicate by Michael Hampton, rnxrx, HopelessN00b, Magellan, Iain Oct 14 '12 at 12:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Did you mean AWS VPC perhaps? – Dusan Bajic Sep 21 '12 at 22:22
Michael Hampton, correct. The problem was bind_ip with both my mongodb and mysql. If you would like to answer this question, I will mark your answer as correct. – Victor Piousbox Sep 22 '12 at 23:08
dusan.bajic, yes VPC. – Victor Piousbox Sep 22 '12 at 23:09

Login with localhost first and execute the following and then try to login with -h10.0.0.23. Follow the steps below.

  1. mysql -u root -h localhost

  2. GRANT ALL ON *.* TO root@'' IDENTIFIED BY 'somepassword';

  3. mysql -u root -psomepassword -h10.0.0.23

share|improve this answer
This is a necessary step, however the problem was in bind_ip config option. Thanks for input though. – Victor Piousbox Sep 22 '12 at 23:10

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