Support » Fixing WordPress » Error establishing a database connection only when trying to view admin

  • Our site went down the other day and we had a message from our host that we (and several other customers) needed to change our database passwords. After changing the password and updating the wp-config file, the front end of the site came back up and continues to work as it should. However, I get the “Error establishing a database connection” message when I try to view any page in the admin. I’ve never seen this problem before. Thank you for any suggestions.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    Please check:
    – Open wp-config.php, check line DB_USER, DB_PASSWORD, DB_HOST, DB_NAME. Make sure the values is same with mysql access

    Do you use VPS or shared hosting?

    If you use VPS hosting, try to restart your mysql server

    Thanks for your response. All of the information is correct in wp-config. The front of the site works fine.

    We are on shared hosting.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error establishing a database connection only when trying to view admin’ is closed to new replies.