Access to the RDS database created with the elastic beanstalk

I created an Elastic Beanstalk environment that created an EC2 instance and an RDS database.

He created security groups and all that. I also know the configuration:

DB endpoint: xxxxx Port: 3306 Username: uuuuu

But I can not connect to it using mysql, either from within ec2 or from the outside.

I get a failure error message.

Any help?

+6
source share
3 answers

If you still have this problem, check your security groups. I was lost in a similar problem and solved it by allowing connections from the security group in which the ec2 instance was running to the security group in which the RDS database was running.

So, if your EC2 instance is in the sg-randomomec2name security group, and your rds instance is in the sg-randomrdsname security group, edit the incoming rules for sg-randomrdsname to allow connections from sg-randomec2name.

+10
source

I had a similar problem: the MySQL RDS instance for my EB application did not respond to connection attempts. I just recreated a new database and reference this in my EB application. There is no reason why I know that my separately created one will work worse than the instance created by the EB master.

0
source

For future viewers, there is now a pretty good tutorial on how to connect an existing instance of ElasticBeanstalk with an existing RDS database (MySQL, etc.).).

Ideally, you should NOT make a database when setting up your ElasticBeanstalk environment, as this ties them together and there is currently no way to undo them without interrupting the environment.

0
source

Source: https://habr.com/ru/post/955516/


All Articles