1

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.

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181
user3077114
  • 33
  • 1
  • 3

2 Answers2

4

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.

slayedbylucifer
  • 22,878
  • 16
  • 94
  • 123
  • 1
    Thank you so much for your reply. You're saving a life here. Lol. I hope I'm understanding correctly...so basically, people can't access the database if the owner of the database do not configured the RDS Security Group and have it set as default? In the link you posted, what is the the different between db security group and ec2 instance security group? – user3077114 Dec 07 '13 at 10:03
  • With `DB security group`, you can control access to any IP address/subnet. With `EC2 Security group`, You just add EC2 security group into your DB security group so that, **ONLY** the EC2 instance which has that EC2 security group applied can connect to the DB. In your question, you have referred only the RDS instance and there is no mention that you are using EC2 instance. So you should be focusing on **DB Security Group** only. – slayedbylucifer Dec 07 '13 at 10:08
  • when would you use or need to use ec2 instance? – user3077114 Dec 07 '13 at 10:13
  • ec2-instance is just a server running windows/Linux but it is running on Amazon's public cloud. you connect ot it remotely via RDP/SSH. You can use RDS with or without EC2 instances. – slayedbylucifer Dec 07 '13 at 10:16
  • You should [Accept](http://meta.stackexchange.com/a/5235) the answer if it solves your question and optionally up-vote it. That's the way to say `Thank You` On StackOverflow. – slayedbylucifer Dec 07 '13 at 10:54
0

This blog posting (http://thoughtsandideas.wordpress.com/2012/05/17/monitoring-and-managing-amazon-rds-databases-using-mysql-workbench/) describes how to use MySQL Workbench with Amazon RDS. It's for an older version of MySQL Workbench but still valid.

Mike Lischke
  • 48,925
  • 16
  • 119
  • 181