Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29404

EC2 and RDS to setup a WordPress site - Error establishing a database connection

$
0
0

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 :

  1. Clearing browser cache & retrying

  2. Manually writing the wp-config.php file (from sample config file copy) with credentials in it.

  3. 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) )

  4. Adding RDS security group to EC2 security group's OUTBOUND group.

  5. 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.


Viewing all articles
Browse latest Browse all 29404

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>