1 Answer
- Newest
- Most votes
- Most comments
0
When you're unable to connect to an AWS RDS MySQL instance from your local MySQL Workbench or telnet, there are several key areas to check:
- Public Accessibility Setting:
- Ensure your RDS instance is set to be publicly accessible if you're connecting from outside the VPC.
- Even with public access enabled, the instance needs to be in a public subnet for external connectivity.
- Subnet Configuration:
- Check that all subnets in your RDS subnet group are public subnets.
- Each subnet should have a route table entry with an Internet Gateway as the destination.
- Mixed public and non-public subnets in the subnet group can cause connectivity issues.
- Security Group Settings:
- Verify that the security group associated with your RDS instance allows inbound traffic on port 3306 from your specific IP address.
- Double-check that your VM or local machine's security group allows outbound traffic on port 3306.
- MySQL Workbench Configuration:
- Ensure you're using the full RDS endpoint provided by AWS, not 'localhost' or '127.0.0.1'.
- Verify you're using the correct username and password.
- Check that you're using the standard TCP/IP connection method.
- Network Connectivity:
- You can use the Amazon Reachability Analyzer to help identify network connectivity issues.
- Try using the
nslookupcommand on your RDS endpoint to confirm DNS resolution.
- Alternative Connection Methods:
- For security reasons, making RDS publicly accessible is not recommended.
- Consider using AWS Systems Manager Session Manager's port forwarding function for more secure connections.
- If your RDS is in a private subnet behind a NAT Gateway, you might need to connect through a bastion host.
If you've verified all these points and are still experiencing issues, the problem might be related to your local network configuration or firewall settings that are blocking outbound connections on port 3306.
Sources
Troubleshooting Connection Issues Between MySQL Workbench and AWS RDS | AWS re:Post
Msql workbench 無法練線 rds mysql | AWS re:Post
Unable to connect with RDS which is in private subnet and its under nat gateway | AWS re:Post
Connection to MySql workbench | AWS re:Post
Connecting AWS Rds with my My SQL Workbench | AWS re:Post
answered 8 months ago
Relevant content
- asked 2 years ago
- asked 3 years ago
