I am getting the error: \"error establishing a database connection\" after moving my wordpress blog to Amazon EC2. I\'ve checked the wp-config.php file and settings are ok (loca
I got the same error for my website, I just rebooted my instance and voila, problem solved.
My case:
I am using amazon free tier, and some bot requested my website and due to the high number of connections, the sql database could not serve the load. I have hence installed the load balancer too :) Hope it helps