1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Error establishing a database connection

Discussion in 'Site & Server Administration' started by screationz, Aug 19, 2015.

  1. #1
    Hi,

    Can someone please help me with this.
    When i go to my website homepage i get this error
    Error establishing a database connection
    i run on wordpress
     
    screationz, Aug 19, 2015 IP
  2. DigitalThirdCoast

    DigitalThirdCoast Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Seems you aren't the first to experience this: https://wordpress.org/support/topic/the-infamous-error-establishing-a-database-connection

    Hope it helps!
     
    DigitalThirdCoast, Aug 19, 2015 IP
  3. TheMostCreative

    TheMostCreative Well-Known Member

    Messages:
    861
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Check your WP-Config file if it has your correct database information, if it does then check the mysql service if its running.
     
    TheMostCreative, Aug 19, 2015 IP
  4. Roger S

    Roger S Active Member

    Messages:
    46
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #4
    Hello,

    Please check the following.
    1. Logins in the config file.
    2. MySQL service is running or not.
    3. Check if there is any DB corruption.
    4. Also a stupid fix that works at times.

    In wp-config change localhost to 127.0.0.1

    If you have shell access it will be easy to test.

    Type
    Mysql -u db_user -p db_name;
    Type the password of the msql user.


    If the above works then the MySQL db and config is fine. Check the hostname trick.

    Let me know if that helps.
     
    Roger S, Dec 26, 2015 IP