Connect to Amazon RDS with PHP


I am trying to connect my RDS Instance with my PHP connection file.

This is what I have in my file:

I replaced localhost with my endpoint (rds thing) url, username and password with my RDS Instance user and pass and database name the one I’ve set when I created the instance. But it doesn’t seem to work.

Is there anything else I have to do that I am not aware of or should it work?


Some ideas:

  • Try using the actual IP of the instance, then it should work.
  • Did you authorized access to your DB instance?
  • You may want to have a look at Get Started with Amazon RDS to properly setup your RDS instance

Leave a Reply