Reputation: 3938
I've set up a basic AWS RDS in the free tier. No public access but created a security group with my IP address added as an inbound rule.
For authentication I have RDS password plus AWS IAM.
I try to connect to the db via my computer (Ubuntu) with the following command:
mysql -h <db-conn>.amazonaws.com -P 3306 -u admin -p
I've already looked at this answer - Cant connect to mysql server on AWS RDS My port isn't blocked and I've checked the security group. I am able to successfully run AWS CLI commands like this:
aws rds describe-db-instances --filters "Name=engine,Values=mysql" --query "*[].[DBInstanceIdentifier,Endpoint.Address,Endpoint.Port,MasterUsername]"
But every time I run the mysql
command, I get the following error:
ERROR 2002 (HY000): Can't connect to MySQL server on '<db-conn>.amazonaws.com' (115)
Would love some assistance with this. Thanks!
Upvotes: 0
Views: 2999
Reputation: 5396
For being able to connect to your AWS RDS system and not letting anyone to connect you need to do the following steps:
In that way you will be able to access your RDS from your public IP, but noone else will be able to access.
Upvotes: 2
Reputation: 46
check your ip that config in the security group, it is need your public ip not like '192.168.xxx.xxx', you can get your public ip by google
Upvotes: 0