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.

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 10.0.0.23, 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 10.0.0.23
ERROR 2003 (HY000): Can't connect to MySQL server on '10.0.0.23' (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< --- 
mysql> 

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

My security group allows port 3306 inbound from 0.0.0.0/0 AND from 10.0.0.0/24. 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

1 Answer 1

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@'10.0.0.23' 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.