Msql workbench 無法練線 rds mysql

0

Cannot Connect to Database Server Your connection attempt failed for user 'masterUsername' to the MySQL server at rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazonaws.c.... Unable to connect to rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazona...:3306 Please: 1 Check that MySQL is running on address rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazonaws.co... 2 Check that MySQL is reachable on port 3306 (note: 3306 is the default, but this can be changed) 3 Check the user masterUsername has rights to connect to rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazonaws.co... from your address (MySQL rights define what clients can connect to the server and from which machines) 4 Make sure you are both providing a password if needed and using the correct password for rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazonaws.co... connecting from the host address you're connecting from

team
asked 25 days ago33 views
1 Answer
1

Hello.

When I tried to resolve the name using the "nslookup" command, I was able to confirm the public IP address, so I assume that RDS public access is enabled.
In this case, you need to configure the RDS security group's inbound rules to allow the public IP address you are connecting from.
Also, make sure that a route to the Internet gateway is set in the route table of the subnet where RDS is running.
https://repost.aws/knowledge-center/rds-connectivity-instance-subnet-vpc

nslookup rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazonaws.com
Server:         172.29.240.1
Address:        172.29.240.1#53

Non-authoritative answer:
rds-mysql-10mintutorial.c9acoo888a18.us-east-1.rds.amazonaws.com        canonical name = ec2-54-159-171-16.compute-1.amazonaws.com.
Name:   ec2-54-159-171-16.compute-1.amazonaws.com
Address: 54.159.171.16

By the way, enabling public access for RDS is not recommended for security reasons, so please consider connecting using Session Manager's port forwarding function, etc., 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 25 days ago
profile picture
EXPERT
reviewed 25 days ago
profile picture
EXPERT
reviewed 25 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