Hi I am trying to connect to Amazon Web Services MYSQL RDS Instance using PHP code stored in AWS EC2 instance. My AWS EC2 instance is connected properly and i have installed Apache, PHP and MYSQL using PuTTY SSH Client. However, when I execute my PHP code from browser, I get following error:
ec2-.....compute.amazonaws.com (EC2 Public DNS) is currently unable to handle this request.
HTTP ERROR 500
Here is my PHP code:
NOTE: I have used AWS MYSQL RDS instance endpoint(without port number) as "DB_SERVER", master username and master password of AWS MYSQL RDS instance. I have stored my PHP file in /var/www/html.
Can anyone tell me why I am unable to connect to my AWS MYSQL RDS instance via AWS EC2 instance???