Reputation: 174
I created simple free tier RDS instance for mysql connection testing from local. i made sure Public accessibility
is yes
created inbound rule as this (all traffic for all ports from anywhere)
> sgr-052bd15d02d6f0xxx – All traffic All All sg-857778f1
> sgr-085e08ad1f482xxxx IPv6 All traffic All All ::/0 for sqlyog
then i ran following command
mysql -h database-1.czzsgxxxxxxx.us-east-2.rds.amazonaws.com -P 3306 -u admin -p
(entered password)
but it doesn't connects and gives following error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'database-1.czzsgzotg0i1.us-east-2.rds.amazonaws.com' (110)
Now i've researched a lot and found out that this problem gets fixed only by changing the inbound rule for db but in my case its still not working(also i've tried other inbound rules but that didn't work either.
Upvotes: 1
Views: 894
Reputation: 270294
If you are wanting to connect from your own computer on the Internet to the Amazon RDS instance, the Security Group needs an Inbound rule for:
Looking at your current rules:
> sgr-052bd15d02d6f0xxx – All traffic All All sg-857778f1
> sgr-085e08ad1f482xxxx IPv6 All traffic All All ::/0 for sqlyog
The first line is only accepting incoming connections from Security Group sg-857778f1
. The second line is for IPv6.
Upvotes: 2