问题
How to connect with MySQL RDS instance in AWS remotely?
It keeps throwing the following error when I connect with Standard (TCP/IP):
ERROR 2003 (HY000): Can't connect to MySQL server on 'xxxxxxx.yyyyyyyyy.us-west-2.rds.amazonaws.com' (10060 "Unknown error")
Tried with Workbench and MySQL Utilities. However, when using Standard TCP/IP over SSH, when I add .pem key file, I could connect to the instance.
回答1:
There are various problems why it cannot be connected:
- Security Group:
The RDS Security Group for the RDS instance needs to be configured to allow access from your IP address. Once it is done, then you can verify that you have GOOD connectivity by running telnet 3306. Once you are able to connect fine, then I should be able to connect using MySQLWorkbench. [Answered by slayedbylucifer]
- Firewall
Check what outgoing ports are open in the firewall on the network your personal computer is on. Even though the the RDS Instance allows for all traffic, your firewall may be blocking you from making the connection. [Answered by vijrox]
- Publicly Accessible:
Check if the security parameter of the instance - Publicly Accessible is set to Yes. Otherwise, even though all security group is configured well and port is available for connection the instance remains unavailable. If publicly accessible option is disabled, it can be enabled by:
- Creating a snapshot of that instance.
- Launch new instance from that snapshot with the Publicly Accessible option set to Yes.
来源:https://stackoverflow.com/questions/37412850/connecting-to-aws-rds-remotely-without-key-using-workbench-or-other-mysql-utilit