Error establishing a database connection

Discussion in 'Databases' started by sheeba1, Apr 2, 2010.

  1. #1
    Some times I am getting the error "Error establishing a database connection" while opening my wordpress paid blog.

    I have given correct "username" and "password" on "config.php" file.

    Can anyone help me to fix this.
     
    sheeba1, Apr 2, 2010 IP
  2. moneycms

    moneycms Peon

    Messages:
    265
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check if you are refering to the right database. And make sure it exists.
     
    moneycms, Apr 2, 2010 IP
  3. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #3
    You said sometimes, maybe the database server is in trouble
     
    nabil_kadimi, Apr 2, 2010 IP
  4. sheeba1

    sheeba1 Peon

    Messages:
    302
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    @moneycms, yes I recheck my database, have correct details. @nabil_kadimi can you please give me more details about "database server" .
     
    sheeba1, Apr 3, 2010 IP
  5. WebHostingNerds.com

    WebHostingNerds.com Peon

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    the database server might be under high load. The database server can be on the same server that hosts your website

    it's that thing identified by define('DB_HOST', 'localhost'); in wp-config.php

    if this line contains localhost your database is hosted on the same physical server of your website, otherwise it might contain a number like 123.123.123.123 which would mean it's hosted on a separate server.

    if it gives you the error message only sometimes it's probably a high load issue and there's not much you can do about it if not opening a ticket with your host asking them to check the issue. Even if your websites aren't getting high traffic volumes, others on the same servers might be using most of the resources, this is the only big problem of shared hosting.
     
    WebHostingNerds.com, Apr 11, 2010 IP
  6. sheeba1

    sheeba1 Peon

    Messages:
    302
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks "WebHostingNerds.com" I will check with my hosting provider.
     
    sheeba1, Apr 12, 2010 IP
  7. MEMORIES89

    MEMORIES89 Peon

    Messages:
    1,461
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    your database may have some problem
     
    MEMORIES89, Apr 14, 2010 IP