Error establishing a database connection


Error establishing a database connection

( Error establishing a database connection)

@pixelsandcode, are you sure that the database credentials are correct? Read more here:

how can i confirm or find if the DB credentials are correct or not? Cuz i didn’t change anything.

In the SQL Databases section vPanel. Then check the credentials in the wp-config.php file in /htocs directory via FTP or file manager. Also did you install it via softaculous?

i installed wp via softaculous

what is vpanel paswword?

Can you try uninstalling the installation and try again? This may help in some cases.

It will be provided in the client are, here:

uninstalling will affect my website right?

Is this an old installation? If it is a new installation no problems!

i have removed wordpress and installed again. but still it says " [Error establishing a database connection]"

Did you verify the database hostname in the wp-config.php file with that in the vPanel? Sometimes it may set something else. Can you share the screenshot of the wp-config.php file. Make sure to hide/blur the password.

screenshot (1)

Change ‘’ with that in your vPanel:
this is just an example!


it still give me same error. is there a way i delete these dbs and wordpress installation and make new installation of wordpress cuz i have the backup of my site.

Change this:

yes i changed this. before it was something else. i changed this now.

As I said, you can delete that in softaculous, under the installations tab, here:
Step 1: Go to softaculous and click on the all installations tab.

Step 2. Find your installation and click on the cross (delete) button.

Step 3. Then finally, scroll down and remove the installation.

yes i did the fresh installation but when visit website it said database error not established same error. when i go to mysql db there were 2 dbs the old one and new one…