Skip to main content

Posts

Showing posts with the label amazon-ec2

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.