WordPress 3.1.1 site was down with error
Error establishing a database connection.
Checking the server logs showed memory errors
A reboot of the VPS cleared the memory error however this error appeared in it’s place
Fatal error: Call to undefined function get_userdata() …… /wp-includes/capabilities.php on line 488
A repair of the mysql database didn’t fix this problem. Googling the error didn’t come back with anything useful either.
Testing with another browser allowed most pages to come up without this error so it appeared to be something to do with the other browser having a cookie for the admin user which corresponds to the error about get_userdata.
Deleting the admin user (the only one) from the wp_users table allowed both browsers to view the site.
Recreating the user with the same user_pass and other details allowed both browsers to view the site so there was a problem with the wp_users table preventing the site from operating.