"Error establishing a database connection" and Other Database Errors.

Avatar
  • updated
  • Answered

Wordpress site. Getting the above mentioned error. Support was not helpful really. Need to know why this is happening. It is not consistent and it happens from time to time. 

Thanks in advance!

error

Duplicates 2
Both my wordpress websites are down with "data base errors"?

I am trying to login-wp to my websites and both return error establishing data base errors? Please help! Thank you.

Why is my site showing Error establishing a database connection?

When I try to open my site, it shows 

Error establishing a database connection

please what's the issue 

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

I recommend doing a check database and repair database in cPanel.

Avatar
IMH Support Agent 1
  • Answered

Hello Woko,

Thank you for contacting us about an error establishing a database connection message. Check the database setting in your software. For example, if you are using WordPress your database settings will be in the wp-config.php file. 

This can also be caused by corrupted database tables. You can check and repair the database in phpMyAdmin.

Thank you,

John-Paul

Avatar
anonymous
Quote from Akrion

That is what the support representative already did and it did not help at all.

Sorry to hear. Have you tried changing the database password in cPanel > MySQL Databases and updating password in wp-config.php ? Also, have ensured MySQL is working properly on your server?

Avatar
Akrion

That is what the support representative already did and it did not help at all.

Avatar
anonymous
  • Answer
  • Answered

I recommend doing a check database and repair database in cPanel.