Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are attempting to slowly migrate a website over to AWS among other things. We decided the first thing to move was the database. We have some dedicated server with a different hosting provider. We only have one IP. I am having trouble authorizing the ip so that the old server can connect to RDS. It simply hangs for a while while using the mysql cli, then responds:

ERROR 2003 (HY000): Can't connect to MySQL server on '' (110)

It did work on my laptop though. I am not quite sure what is wrong. I have a feeling I don't quite understand CIDR/IP. I simply took the ip address and tacked on /32 at the end. Then I gleaned some information that it also has to do with subnet mask? ifconfig reports:

I found a calculator and the IP changed a bit and had /24 at the end. That still didn't work.

One other note... perhaps i dont know enough about the differences between OS. The hosting provider is using centOS, while our development machines are all ubuntu.

Any insight would be extremely helpful! THANKS :)

share|improve this question

If it works from your laptop, apparently you have authorized the IP at which your laptop appears on the Internet to connect to RDS. Browse to see that public IP. If you browse to whatismyip from your dedicated server, you can verify that server's public IP, and make sure it is authorized in AWS. If it's just one IP, enter it as x.x.x.x/32.

If you use tcp port 3306 for MySQL, from a shell/cmd prompt on the dedicated server, enter

telnet 3306

If the connection times out instead of opening a new window, and you confirm that your dedicated server's public IP is authorized, then something in your server or hosting provider's network is probably blocking your connection. Support should be able to help find and fix it.

share|improve this answer
The server runs Centos – Jacob Feb 13 '11 at 0:00
the IP is what i thought it was... It should be fine from the aws side. I checked using whatismyip from the server too. would i need to add some certificate or something from the dedicated server? – Parris Feb 13 '11 at 23:01
nvm, solved! :) thanks for the help – Parris Feb 14 '11 at 0:43

Simply adding the EC2 IP to security group does not works, you should add security group, it is well explained in the document. It worked for me

share|improve this answer
up vote 0 down vote accepted

ahhh there was apparently some /etc/csf config that needed to accept to open a port. That service had to be restarted. I guess it may be some firewall? Not sure. If anyone else is having issues connecting from an external hosting provider just ask them for help and they should be able to open up port 3306.

share|improve this answer
Yep. CSF = ConfigServer Security & Firewall. – Paul Feb 14 '11 at 1:52

As I had answered on a previous question regarding this very topic you have to setup the Security Group (SG) of which AWS account or CIDR notation address is allowed to connect to the RDS instance. The default if you don't configure it is to allow no hosts to connect.

share|improve this answer
that wasn't my question. I understood how to do that; however on certain servers there is csf file that needs to be edited before connecting to an external db as mentioned above. – Parris May 17 '11 at 18:56
Then your question was poorly written then since it wasn't really an issue with Amazon RDS but your hosting solution. One reason I refuse to use any hosting service "control panel" application to manage my servers because they are useless and get in the way of real system administration. – Jeremy Bouse May 17 '11 at 21:47

If you have configured the firewall rules on the environment, you should probably also change the parameter bind-address on file /etc/mysql/my.cnf to be discussed or specified an ip that can access the environment.

share|improve this answer

Your Answer


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.