• 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. This could mean your host’s database server is down.

    * 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.

    ———-

    I checked the username and password and database name but nothing was wrong about them….
    what should i do?

Viewing 15 replies - 1 through 15 (of 17 total)
  • contact your host and ask them if they use localhost or a some other connection to database as some host do not use localhost.

    Yasharino. Did you fix the issue? I had the same problem, or at least the same error as you did. My problem is that I didn’t put the database before the username, like mydatabase_username. I only put the username. Hope you get it fixed!

    Thread Starter yasharino

    (@yasharino)

    I fixed it by changing the SQL name from”localhost” to the one that The host panel gave me.
    the name is like sq.domainnam.com

    fc999999.axxxxxxx.net is the hostname in the console.

    i made the explicit change – it still doesn’t work.

    but, thanks for the idea.

    Thread Starter yasharino

    (@yasharino)

    I just went to the database management section and copy the address of the MYSQL database that I have had created it for installation. then pasted it to config file with username and password needed.

    That is common mistake lot of people make as not all host use localhost and wordpress sets that as default so its best to check with the host they will tell you what to use.

    but this doesn’t work even using the explicit hostname from the console.

    @entrepreblog have you checked with your host why you can not connect to database.

    @govpatel, i _am_ the host: it’s a caged server, it’s running many apps, including another insulated wp instance; and i have many other wp instances running on other hosts – dedicated and otherwise.

    native commandline mysql works fine with the credentials in teh wp-config.php file. i’ve tailed the usual suspect log files and don’t see anything from the wp failure to connect.

    there is nothing in the host side to indicate why my results are the same as this:

    http://tabletennisetc.co.uk/tabletennis/wp-admin/install.php

    there are 2 other threads open here with individuals having exactly the same problem.

    thanks.

    @govpatel, do you know where the debug output is recorded in wordpress?

    Ok.

    Does A N Y B O D Y know where debug output is recorded in WordPress?

    If debug is set to true, where is it written?

    Moderator t-p

    (@t-p)

    So, one week later, and level 2 support tries this:

    • Rename ‘wordpress’ directory to ‘wordpressblog’
    • …and it works.

      Anyone want to weigh in on that?

      It FIXES the problem. Any ideas why?

    I will cross-post this, as it may apply more than one item, but after pulling my hair out on this for many, many days I got level 2 support at cari.net involved. They were also puzzled, but finally the support person tried something simple: he renamed the folder (‘wordpress’) to ‘wordpressblog’.

    And it instantly began working as advertised.

    Why? Who knows, and at this point I don’t really care to spend anymore time figuring it out.

    But it might be worth a try.

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Error establishing a database connection’ is closed to new replies.