But no, the Technology Gods were not smiling on me. (Sure Jareth, Davey Shafik’s evil cat has something to do with it!)
What do I get, when all excited and happy at BarCampMelbourne2008, ready to serve and blog?….
Can’t select database
We were able to connect to the database server (which means your username and password is okay) but not able to select the <myDB> database.
So, here’s how I fixed it (and yep, I’ve posted it on the support forum to help others too….so considerate )
- First, I checked that the username, password etc (and the table prefix, don’t forget that if you’re running multiple installations) were correct. They were.
- Then, I went into the MySQL control panel in my hosting provider’s controls (usually something like cPanel and deleted the database user (not the database).
- I recreated the user (good idea to change the password for security purposes, don’t forget to change it in the wp-config.php file) using the MySQL tools in the cPanel
- The user was then associated with the database
- Check DB and repair DB were then run over the database
- And…. voila!
My theory here is that during a hosting upgrade, something occurs which dissociates the DB users from the database, meaning the users have to be recreated and re-associated.