且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用MySQL Workbench连接到Amazon RDS

更新时间:2022-11-29 20:31:05

您的RDS实例的RDS安全组需要配置为允许从您的IP地址访问,那么你可以通过运行 telnet< you_RDS_Instance_Name> 3306 验证你是否具有良好的连接。一旦你能够连接好,那么我应该能够使用MySQLWorkbecnh连接。 / p>

我本人从未使用过MySQL Workbench,但我使用 MySQL cli 连接到我的RDS实例。



这是示例 telnet 命令:

 #telnet myrds.us-west-2.rds.amazonaws.com 3306 
试用10.249.88.207 ...
连接到myrds.us-west-2.rds.amazonaws.com 。
转义字符是'^]'。
N
5.6.13-log▒)BM @ 5)nwl \eeM / B?Vr [P_mysql_native_password ^]
telnet> q
连接已关闭。

阅读更多关于RDS安全组此处


I just heard about amazon rds and MySQL Workbench today from my partner for my group project, so I'm not very familiar with them. My partner has created a host account on amazon rds for our database, and I am suppose to help create table and make sql queries. However, I'm having no luck connecting to the database through MySQL workbench. The error message I received is "Unknown MySQL server host '*host_address*'. I have tried adding port 3306 to my firewall as suggested by a blogger, but that still doesn't work. There are some answers that say in order to connect to amazon rds, the user would need to add his/her IP address to the "DB Security Group" in amazon rds. So, does that mean my partner would need to add MY IP address to "DB Security Group" in the amazon rds account that my partner had created for the database? I been working on getting the connection for the last 6 hours, so I'm very greatful if someone could answer my question or point me in the right direction. Thank you for all your help.

The RDS Security Group for your 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 <you_RDS_Instance_Name> 3306. Once you are able to connect fine, then I should be able to connect using MySQLWorkbecnh.

I have personally never used MySQL Workbench but I connect using MySQL cli to my RDS instance.

Here is the sample telnet command:

# telnet myrds.us-west-2.rds.amazonaws.com 3306
Trying 10.249.88.207...
Connected to myrds.us-west-2.rds.amazonaws.com.
Escape character is '^]'.
N
5.6.13-log▒)BM@5)n▒\eeM/B?Vr[P_mysql_native_password^]
telnet> q
Connection closed.

Read More about RDS Security Groups here.