WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection! Please HELP (7 posts)

  1. arafat_ah
    Member
    Posted 1 year ago #

    Sometimes when I click on the "Publish" button to post a new article on my WordPress blog, then this error message appears:

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

    Despite the error message appears, my post got published and there is no problem with visiting my site. This error does not come after each post publication. Sometimes it occurs. (My hosting reseller provider changed my server some days ago and this problem began after coming to the new server) What is the problem and how to solve it, please tell ...... Thanks.

  2. David Choi
    Member
    Posted 1 year ago #

    It's probably because your MySQL database server is down from time to time, it has nothing to do with WordPress or Web Server. Only your hosting support can help you, tell them to fix the problem or move to another MySQL server.

  3. arafat_ah
    Member
    Posted 1 year ago #

    I guess, If the WP-Config.php file contains wrong username/password then error message should appear all the times. But in my case, the error message comes only random times. Not always... So, may I think that there is no issue with wp-config.php username/password here?

  4. David Choi
    Member
    Posted 1 year ago #

    Yes, it's either network connection or MySQL database server issue.

  5. arafat_ah
    Member
    Posted 1 year ago #

    can I check exactly what is the issue?

  6. David Choi
    Member
    Posted 1 year ago #

    If you have root SSH login, yes, that's possible by analyzing the log files:

    http://dev.mysql.com/doc/refman/5.0/en/server-logs.html

  7. railpnrstatus
    Member
    Posted 1 year ago #

    You can change the host address to IP address and can solve this problem.

    I found this two articles on web having solutions..

    http://www.webburr.com/wordpress/error-establishing-database-connection-wordpress/748

    http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/

Topic Closed

This topic has been closed to new replies.

About this Topic