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
You did not indicate whether you are moving your blog from myolddomain.com to mynewdomain.com, and whether you are using normal WordPress or multi-site WordPress. But here are some tips that might help:
First, you need to make sure your wp-config.php is configured correctly (database server, username, password...)
Secondly, WordPress uses database to store some information about the current host, look at tables wp_site, wp_options,wp_sitemeta and replace all rows containing myolddomain.com by mynewdomain.com.
Make sure your EC2 security group is configured correctly.
This article might help, too.