From 869714e60b032261864c6a2d582ab9b8ffa97cd9 Mon Sep 17 00:00:00 2001 From: saxmatt 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: http://svn.automattic.com/wordpress/trunk@625 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 e8fa14726..30f17b870 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

    "); } }