I can only connect by ssh-ing into my ec2, and then using mysql from the cli.
I can not connect:
- ssh-ing into my ec2, and connecting from PHP
- mysql command line on my local machine.
I cannot ping my rds endpoint from anywhere, including, oddly enough, from while ssh-d into the ec2 machine from which I actually can connect.
PHP gives me the error: PHP error: php_network_getaddresses: getaddrinfo failed
when I run:
mysql_connect('rds hostname', 'ebroot', 'password');
mysql -h aaec248lyez3jg.ce3r5quzhqoq.us-east-1.rds.amazonaws.com -uebroot
etc from my local machine gives me ERROR 2003 (HY000): Can't connect to MySQL server on ...
but works fine when ssh'd.
My RDS has this security group:
Which uses this ec2 sec group:
How am I not able to connect when all my settings are "ALLOW ALL FROM ANYWHERE"?
Why am I able to connect only through ssh tunnel and mysql client, but not even from using php from the same machine?
What's going on?