I have set up a WordPress website on a Ubuntu 12.04 Amazon ec2 machine by following this tutorial except the fact that I haven't created a MySQL database and I am using an amazon RDS MySQL service.

Everything works fine and I am able to create a configuration file during installation but when the installer asks for MySQL credentials. When I fill in the RDS credentials they don't work. I even tried entering the credentials manually in the wp-confiq file and still it said it couldn't connect to the database .

I tried to test out the same credentials on another WordPress installation in a shared hosting environment and the result was the same.

Then on the ec2 WordPress server I installed MySQL and then provided the MySQL details during installation and everything worked fine hence proving its something to do with RDS only.

Additional Details:

  1. The DB security Group has only one security: the EC2 Security Group

  2. Both EC2 and RDS are located in AWS singapore southeast-1a regions

  3. EC2 Security: only port 22 (ssh) and 80 (http) opened

1 Answer 1


You can set your DB Security Group to allow access from specific 'EC2 Security Groups' or 'CIDR IP ranges'.

Visit this URL to explore more:

Well, You have already mentioned that, you allowed access to 'EC2 Security Group'. Refer above URL and make sure that you did it correctly.

If it didn't help, then try to give access to the CIDR IP range (Above URL will help you for that too).

  • i did that but still cant connect this is what i added XXX.XXX.XXX.XXX/32 in the CIDR/IP section in DB security groups (where XXX.XXX.XXX.XXX is the Elastic Ip of my ec2 Machine)
    – Danny
    Dec 22, 2012 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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