While trying to setup a wordpress site using RDS - Mysql and EC2 instance - I'm getting Error establishing a database connection (I already have httpd, php, php-mysqlnd.x86_64 installed on my ec2 instance)
I've searched extensively about this on the net and unable to find a conclusive solution. Tried everything below, in almost all possible permutations :
Clearing browser cache & retrying
Manually writing the wp-config.php file (from sample config file copy) with credentials in it.
Installing mysql-server on EC2 instance and trying via mysql -u -p -h (In this case I get - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) )
Adding RDS security group to EC2 security group's OUTBOUND group.
Also adding the Private IP/32(or 16) to the INBOUND rule of RDS security group (connection type mysql/aurora)
PLEASE HELP! I've been scourging throughout the net for days now, not able to resolve it.