I encountered this error after the power interruption yesterday. I was in the middle of debugging my wordpress theme codes when the CPU turned off. The error message thrown is very generic and you cannot easily pinpoint what caused the error.
If ever you encounter this error, here are some things to check:
1. Check the values of your wp-config.php file. Make sure that the values on the DB_NAME, DB_USER and DB_PASSWORD are correct. You can check if these values are correct by connecting to the desired database using MySQL Query browser, command line or phpmyadmin.
2. Still on the wp-config.php file, check if there are extra garbled characters on the file. If there are, remove them. Also make sure that the encoding of the file is UTF-8.
3. Restart your MySQL and Apache services after config changes.
4. Check if you can select from your wp_options table. In my case, this table somehow got corrupted during the power disruption. The wp_options table is among the first tables that wordpress queries when it loads. Failure to query from this table throws the aforementioned error. It is good if you keep a backup of your database and load the contents of this table. Otherwise, you may need to drop the table and run the install script to load data to this table.
Hope this helps!

