MySQL Workbench won't connect to AWS RDS DB. ERROR - "Unable to connect to localhost"

Viewed 6827

This image shows the error pop up when I try to test the connection image shows the error pop up when I try to test the connection

Current Set Up: 2015 MacBook Pro. OS 10.15.7

Things that I have tried:

System preferences > MySQL > initialize setup.

Checked Username is correct on AWS RDS set up.

Checked the endpoint address.

Tested connection on a 127.0.0.0 database. Works fine.

1 Answers

Sounds like you have not configured the Security Group related to your RDS instance. You must set up inbound rules for the security group to connect to the database. You can set up one inbound rule for your development environment and another for Elastic Beanstalk (assuming you use that to host your app). Setting up an inbound rule essentially means enabling an IP address to use the database. Once you set up the inbound rules, you can connect to the database from a client such as MySQL Workbench. For information about setting up security group inbound rules, see Controlling Access with Security Groups.

Related