By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Connection to MySql workbench

0

Hi, when I try to make a new connection with the database that I created with the specific endpoint,I get error in MySql. I tried to change the security group as I saw on Youtube but it's still the same... I read the similar questions that have been asked before with the answers, still didn't get a solution. What can I do? And thanks in advance!

2 Answers
0

I'm sorry to hear you're having trouble connecting to your MySQL database using MySQL Workbench. Let's go through some troubleshooting steps to help resolve this issue:

  1. First, ensure that your RDS instance is in an "available" state. You can check this in the AWS Management Console.

  2. Verify that the security group associated with your RDS instance allows inbound traffic on port 3306 (the default MySQL port) from your IP address. This is a crucial step that you mentioned you've already attempted, but it's worth double-checking.

  3. In MySQL Workbench, make sure you're using the correct endpoint for your RDS instance. Don't use 'localhost' or '127.0.0.1' - use the full endpoint provided by AWS for your RDS instance.

  4. Double-check that you're using the correct username and password for your database.

  5. Ensure that your local firewall (on your computer) is not blocking outbound connections on port 3306.

  6. If you're trying to connect from outside the VPC where your RDS instance is located, make sure the instance is set to be publicly accessible.

  7. Check if your RDS instance is in a subnet group that consists of public subnets. All subnets in the group should have a route table entry with an Internet Gateway as the destination.

If you're still encountering issues after trying these steps, you might want to:

  1. Use the Amazon RDS Reachability Analyzer to help identify any network connectivity issues.

  2. Try connecting using the MySQL command-line client instead of MySQL Workbench to rule out any issues with the Workbench application itself.

  3. Check the specific error message you're receiving. If it mentions "Unable to connect to localhost" despite using the RDS endpoint, this could indicate a configuration issue in MySQL Workbench.

  4. Review any relevant logs on your local machine or within AWS for more detailed error information.

If the problem persists after trying these solutions, you may need to contact AWS support for more specialized assistance, as there could be specific configuration issues with your RDS instance or VPC that require deeper investigation.
Sources
Troubleshooting Connection Issues Between MySQL Workbench and AWS RDS | AWS re:Post
Troubleshooting connections to your MySQL DB instance - Amazon Relational Database Service
Connecting to a DB instance running the MySQL database engine - Amazon Relational Database Service

profile picture
answered 16 days ago
0

Hello.

If you are trying to connect directly from your local PC with MySQL Workbench, you must enable public access on your RDS instance.
Please check if the following document settings are enabled.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Hiding

Also, make sure that not only is public access enabled, but that the subnet you are using with RDS is a public subnet.
By the way, making RDS public access is not recommended for security reasons, so you may want to consider connecting using Systems Manager Session Manager's port forwarding, as introduced in the blog below.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

profile picture
EXPERT
answered 16 days 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.

Guidelines for Answering Questions