Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So, I just created the Amazon RDS account. And I started an instance of database.

The "endpoint" is:
abcw3n-prod.cbmbuiv8aakk.us-east-1.rds.amazonaws.com

Great! Now I try to connect to it from one of my other EC2 instances.

mysql -uUSER -pPASS -habcw3n-prod.cbmbuiv8aakk.us-east-1.rds.amazonaws.com

But nothing works and it just hangs.

I tried to ping it, and nothing works either. Nothing happens.

Do I need to change some settings?

share|improve this question

3 Answers 3

up vote 13 down vote accepted

By default RDS does not allow any connection that is not specified within the Security Group (SG). You can allow based on CIDR addressing or by Amazon account number which would allow any EC2 under that account to access it.

share|improve this answer

It is "just hanging" as you have not configured the firewall to accept mySQL connections from your other instance, as such the packet is being dropped at the firewall level, to resolve this you need to:

  1. head into your AWS console
  2. EC2 tab
  3. Note down the security group of your mySQL server (well call this SG-MYSQL for now)
  4. click security groups on the left of the console
  5. click your group in the center menu SG-MYSQL
  6. click inbound tab
  7. select mySQL from the list, add the details of your client server and save the rule

NOTE the source IP for the server will not be your elastic IP (in most cases anyway) you will have an internal ip on the device (ifconfig on linux will show you this).

share|improve this answer
    
I've done that on my EC2 server. I've opened all the standard ports. –  Alex Apr 25 '11 at 20:20
    
My EC2 server can connect to every other MySQL database just fine (the databases on other servers.) Just not my new RDS database. How can I check if I created the RDS database correctly? –  Alex Apr 25 '11 at 20:22
    
I have no EC2 instance and my RDS couldn't connect to outside world until I did this. –  Neutralizer Nov 22 at 14:02

Fixed.

Had to grant access to it in the security groups under the DB...

share|improve this answer
2  
Can you elaborate on what you did to grant access? –  David Csonka Jun 22 '12 at 5:15
    
My database has a security group with one rule. Allow access from ANYWHERE to port 1433. I can't connect -_- –  The Muffin Man May 29 at 16:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.