- Newest
- Most votes
- Most comments
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:
-
Verify public accessibility: Ensure that your RDS instance is set to be publicly accessible if you're trying to connect from outside the VPC.
-
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.
-
Network configuration: Confirm that the subnet where your RDS instance is located has a route to the internet gateway in its route table.
-
Endpoint and credentials: Verify that you're using the correct endpoint URL, username, and password when attempting to connect.
-
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.
-
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
Relevant content
- asked a year ago
- asked 3 years ago
