Now I am moving the application from the standard dedicated server that I have on AWS EC2. I also migrated the database (MySQL) to Amazon RDS. Now I have a problem that I'm sure this is related to setting up PHP or Apache.
On my dedicated server, I can now easily get the Amazon RDS database, but in the EC2 instance, using the same code, I get this message:
SQLSTATE[HY000] [2003] Can't connect to MySQL server on ....................eu-west-1.rds.amazonaws.com
I can get to the db server both from Sequel Pro on my laptop, and from PHP on my other server. I tried putting the IP address for the MySQL database on another server, but the same error message, so I think there is some kind of configuration in Apache or PHP that I need to do?
This is an instance of EC2 with Apache and PHP on CentOS.
Suggestions on which configuration might block this connection?
lshas source
share