I got this problem on my lat the other day from a site owner.
He was getting the now well documented
Error establishing a database connection
error. I googled and read like a lunatic (not my site by the way). HEre is what I tried
1. Repaired DB by putting the repair command into the wp-config file. This ran fine but the error persisted.
2. I repaired the DB in phpmyadmin again this ran fine but the error persisted.
3. I exported the Database and did a clean WordPress Install and loaded up the database and though it loaded I could not see any of the original site content.
4. I contacted the hosting and they told me do a clean install - easy for them and they don't have a backup...
I don't really want to do a clean install as they lose all their page content and I don't want to lose all the content either.
All / any help appreciated as this site is now down for a bit and it is a alive business. Their original website person is gone AWOL.