05 How to fix error establishing database connection [ fixed ]

Опубликовано: 28 Февраль 2026
на канале: Let's Fix That Error
1,149
2

This problem " Error establishing a database connection ” make your website can not connect to mySQL server. So here is the #fix for this #error.

#error_establishing_a_database_connection

To fix this problem :

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

2. If you use Dedicated server or VPS hosting, try to restart your mysql server by typing :
-service mysql restart
or
-service mysql start
but if you use shared hosting, ignore this step!

3. if all the previous fixes can not fix it, so it's a server-side problem! it is not your error! so let the hosting company fix this error for you because it is their error!

contact them or give them a day or so and they will solve this error and the problem will disappear automatically.

Tell us in the comments if your error is fixed or not.

Like, Comment, and Subscribe!