Kratos
Kratos

Reputation: 1114

access RDS through ec2 beanstalk instance

I have an RDS instance running and I want to access it from a beanstalk instance. They are both in the same VPC and I have followed the instructions from the amazon documentation link.

Here is my table for the inbound rules I have assigned to the security group of the RDS instance.

inbound rules for rds security group

The sg-c6...etc is the security group of the beanstalk instance. When I am trying to run

 mysql -u master -ppass -h rds.instanceid.eu-central-1.rds.amazonaws.com dbname

I am getting

ERROR 2003 (HY000): Can't connect to MySQL server on 'rds.instance.eu-central-1.rds.amazonaws.com' (110)

Upvotes: 1

Views: 69

Answers (2)

Shimon Tolts
Shimon Tolts

Reputation: 1692

It seems to me like you have an issue with networking restrictions within your VPC. Please try to login to your AWS account and navigate to the VPC management section. Navigate to Route Table and select your route table. Edit your Subnet Associations and make sure that all subnets are included

Upvotes: 2

cjwfuller
cjwfuller

Reputation: 450

By default, MySQL server will run on port 3306 but your security group says 3310. MySQL on RDS will be no different. I would suggest changing the security group port to 3306.

Upvotes: 0

Related Questions