Friday, January 13, 2012

Amazon EC2 Linux RH cannt connect from php script to RDS MYSQL


I have an amazon EC2 instance (redhat linux ) and a RDS (mysql 5.5 ). After stop /start EC2 instance. EC2's ip was changed and cannt connect RDS anymore. I can successfully connect RDS instance from command line. However, it is unable to connect from php script and give me this warning. PHP Warning: mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on 'applicantdb.xr3x2xcale.eu-west-1.rds' (13)



It is working fine from my localhost and I can connect to localhost. It is really annoying and if somebody knows the solution. Please help me and I do really appreciate it.

1 comment:

  1. You need to in your RDS Security group make sure that your Amazon EC2 security profile has access.

    ReplyDelete