Connecting to AWS RDS remotely without key using workbench or other mysql utilities

依然范特西╮ 提交于 2021-02-08 12:12:00

问题


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:

  1. Creating a snapshot of that instance.
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!