WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (5 posts)

  1. redmartin08
    Member
    Posted 10 months ago #

    I have several wordpress sites installed with separate databases located on an intranet. They all have the version 3.8.1. All web sites worked for a couple weeks. Last week I looked at one and it had the above mentioned error; then I looked at all of them and same thing. I have gone through everything I can find on the web and your forum and nothing is working to fix this problem. I am the only one who has access to this server so there is no chance of passwords being changed etc. I have a separate, much older site with version 3.0.1 which is perfectly fine. Any help would be greatly appreciated. Thank you.

  2. *B.V.Ramanarao*
    Member
    Posted 10 months ago #

    You might feel secure since you didn't shared your login credentials. But have read about latest wp 3.8.2 update news?
    Make sure your setup not compromised.
    Error establishing a database connection means your wp-config.php might be corrupted. Better verify that.

  3. redmartin08
    Member
    Posted 10 months ago #

    Trust me, I have not been. Like I said, it's an intranet and also a government facility. Thanks for the tip on the update though...had not seen that. Maybe it will fix it (I can only hope).

  4. *B.V.Ramanarao*
    Member
    Posted 10 months ago #

    Oops! I missed its on an intranet.
    Then do one thing. Backup wp-config.php.
    1.Now download fresh wp copy to local pc and get the clean wp-config file from that.
    2.Enter database credentials like db name, db user name, db password, table prefix (not new one the same existing in the db), and salt keys.
    3.Add extra lines of code, if any, generated by plugins like Better WP Security etc.
    4.Make sure every thing is correct.
    5.renaming the existing one to wp-config-bak.php
    6.Upload new wp-config.php to the respective directory folder
    7.Now try to login to backend. If it work ok. otherwise replace with the previous wp-config.php
    8.If all the above method doesn't give you fruitful result, then try to install local servers in you PC using MAMPP, XAMPP etc. Then develop using the wp files and DB backup of the problematic sites on local server. After finding a reasonable solution for the issues concern, then apply them to the site on an intranet.

  5. 2ninerniner2
    Member
    Posted 10 months ago #

    Additionally, and you probably have, but verify that the MySQL server is running; restart even if it is. Restart Apache (or whatever web server you are running) as well.

Reply

You must log in to post.

About this Topic