简体   繁体   中英

RDS unable to connect to local machine

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.

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:

  • Port: 3306
  • Source: Your IP address

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM