How to Fix “Error Establishing a Database Connection” in WordPress
WordPress loaded but could not log in to its database. Test the credentials in wp-config.php, then check the database server, connection limits, disk space and damaged tables, in that order.
