(Last Updated On: October 3, 2017)

How to fix error establishing a database connection

 

How to fix error establishing a database connection in WordPress, CPanel, or website. Anyone can fix this error but you have some technical knowledge about database WordPress or CPanel

 

What is error establishing a database connection?

sometimes user cant able to connect to the database then this error will showing while we access or web but don’t worry about we have an easy solution

How to fix error establishing a database connection

How to fix error establishing a database connection?

First, check your database connection file is there everything ok or not also check your database username, password, and hostname

  1. change database username password 
  2. add username into the database and allow access ( CPanel)
  3. take backup and delete the database and create a new one

create new database cpanel

why I get this error?

you are getting this error on your website because your website database and username connection problem you have to fix your database you can follow above three methods to fix this error

 

How to fix this error in CPanel?

change your database username password and try again and add your username to the database or you can create a new database username also

add user to database

 

if you have any database connection related issue just comment our expert will help to fix your problems also you an open support ticket