• Right now, there’s a problem with my MySQL server. The following error message is shown to the public:
    “Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost.
    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.”
    This error message isn’t helpful at all for my visitors and readers. Can I change it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • another ipower customer..

    Thread Starter Anonymous

    What’s ipower? Hosting by Apple?

    edit wp-includes/wp-db.php
    Find the part that says:
    // DB Constructor - connects to the server and selects a database
    function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
    $this->dbh = @mysql_connect($dbhost,$dbuser,$dbpassword);
    if (!$this->dbh) {

    You will see the text that is displayed on a database error- change it to whatever you like
    die(“<div>

    Thread Starter Anonymous

    Thanks a lot, Clay. And well, what’s the matter with this ipower stuff?

    they were working on the database server earlier

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error page in case of DB connection problem’ is closed to new replies.