I have a free account on AWS. I’ve set up a mysql database and an EC2 instance. I would like to connect to the database from a shell in the EC2. When I try to do so with this command:
mysql -h database-1.clyum4kwu2lg.us-west-2.rds.amazonaws.com -u {username} -p
I get
Can't connect to MySQL server on 'database-1.clyum4kwu2lg.us-west-2.rds.amazonaws.com:3306' (110)
Theyr’e both in the same security group. I have the following inbound rules on the group:
sgr-039fbbc8ad9003041 IPv4 SSH TCP 22 71.38.46.66/32 –
–
sgr-0eff695cc6b9c637c IPv4 MYSQL/Aurora TCP 3306 71.38.46.66/32 –
–
sgr-04d152a98c8ec2356 IPv4 Custom TCP TCP 8080 0.0.0.0/0
and the following outbound rules:
–
sgr-0a1b7e4aebd28bedd IPv4 All traffic All All 0.0.0.0/0
how do I enable connection from the EC2 to the database?