From 0ddb4c155269787477718fbf4f1c4b5fce4b6de0 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 18 Dec 2003 09:18:57 +0000 Subject: [PATCH] Now more sanely deals with bad connection data and offers useful suggestions, doesn't go on when it can't connect to the DB. git-svn-id: https://develop.svn.wordpress.org/trunk@625 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index e8fa147267..30f17b870f 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -31,13 +31,14 @@ if ( ! $this->dbh ) { - $this->print_error("
-

Error establishing a database connection!

+ die("
+

Error establishing a database connection! This probably means that the connection information in youn wp-config.php file is incorrect. Double check it and try again.

  • Are you sure you have the correct user/password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?
+

WordPress Support Forums

"); } @@ -53,11 +54,14 @@ { if ( !@mysql_select_db($db,$this->dbh)) { - $this->print_error("
    -
  1. Error selecting database $db!
  2. + die(" +

    We're having a little trouble selecting the proper database for WordPress.

    +
    • Are you sure it exists?
    • -
    • Are you sure there is a valid database connection?
    • -
"); +
  • Your database name is currently specified as " . DB_NAME .". Is this correct?
  • +
  • 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?
  • + +

    WordPress Support Forums

    "); } }