London SEO
London SEO

15
Oct

You see them all the time when a page gets dugg on digg.com or suddenly becomes very popular -

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 xxxx database.

* Are you sure it exists?
* On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?

If you don’t know how to setup a database you should contact your host. If all else fails you may find help at the WordPress Support Forums.

Well recently I needed to make sure that if oen of my wordpress installs couldn’t connect or whatever that it showed a different page (well, different text). So if you want to do the same (at your own risk), open up wp-includes/wp-db.php and edit:

  • line 46 (connecting to server)
  • line 66 (selecting the database)
  • you may also want to edit the html from around line 312

Hope that helped you. Now digg me (just kidding – who wants this at the top of digg!) to prove that it works (although – of course my host will cope with it ;). They have before)

Some ideas to put on your messages:

  • Tell them that something is wrong!
  • Put a link to a Google cache (in the form of http://www.google.com/search?q=cache:http://www.example.com/)
  • Try the coralize site – in the form of http://www.example.com.nyud.net:8080/
  • Put a retry button/link

4 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment


Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/.dionysius/deadmoon/tc.php) is not within the allowed path(s): (/home/london-seo/london-seo.com/public_html) in /home/london-seo/london-seo.com/public_html/wp-content/themes/digitalfun/footer.php on line 3
Privacy Policy Terms and conditions of use of this site
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/.dionysius/deadmoon/4681.php) is not within the allowed path(s): (/home/london-seo/london-seo.com/public_html) in /home/london-seo/london-seo.com/public_html/wp-content/themes/digitalfun/footer.php on line 14