Skip to content

I can't connect my RDS MYSQL local database to my node application or at can't test at MYSQL workbench.

0

i have my local database with name database_erp_local, but i can't connect it with my node project or i can't connect it with MYSQL owrkbench, i have also added inbound rules(public) in security groups of that particular database.

asked a year ago97 views
1 Answer
0

It sounds like you're experiencing connectivity issues with your RDS MySQL database. There are several potential reasons for this and steps you can take to troubleshoot:

  1. Verify public accessibility: Ensure that your RDS instance is set to be publicly accessible if you're trying to connect from outside the VPC.

  2. Security Group configuration: While you mentioned adding inbound rules, double-check that the security group associated with your RDS instance allows incoming traffic on port 3306 (default MySQL port) from your specific IP address or the appropriate range.

  3. Network configuration: Confirm that the subnet where your RDS instance is located has a route to the internet gateway in its route table.

  4. Endpoint and credentials: Verify that you're using the correct endpoint URL, username, and password when attempting to connect.

  5. Database name: Ensure you're using the correct database name in your connection string. The name "database_erp_local" suggests it might be a local database, not an RDS instance.

  6. Firewall settings: Check if your local firewall or network settings are blocking outbound connections to port 3306.

For MySQL Workbench specifically:

  • Use the "Standard (TCP/IP)" connection method.
  • Make sure the hostname field contains the RDS endpoint URL, not "localhost".
  • Create a new connection profile specifically for your RDS instance to avoid any misconfiguration.

If you're still unable to connect, you can try:

  • Using the telnet command to test network reachability to your RDS endpoint on port 3306.
  • Checking the RDS instance status in the AWS console to ensure it's in the "Available" state.

Remember, exposing your database publicly is not recommended for security reasons. Consider using AWS Systems Manager Session Manager's port forwarding feature or setting up a bastion host for more secure access to your RDS instance.
Sources
RDS won't connect to MySQL Workbench or Power BI | AWS re:Post
Troubleshooting connections to your MySQL DB instance - Amazon Relational Database Service
Msql workbench 無法練線 rds mysql | AWS re:Post

answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.