2

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?

Victor Pudeyev
  • 131
  • 1
  • 7

1 Answers1

2

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

Toqeer
  • 1,241
  • 3
  • 14
  • 20