cancel
Showing results for 
Search instead for 
Did you mean: 

Site down: main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost'

SOLVED

Site down: main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost'

The following is the complete error in the log:

main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost' (using password: YES) {"exception":"[object] (Zend_Db_Adapter_Exception(code: 1045): SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost' (using password: YES) at /home/(removed)/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144, PDOException(code: 1045): SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost' (using password: YES) at /home/(removed)/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128)"} []

I have tried many solutions but nothing worked, can anyone help me with this?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Site down: main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost'

Hi @usman_hussain

 

Looking at the error log you have posted , the issue is either your database user is removed or database user 's password is changed  and that's the reason its not accessible to the database !

 

so do one thing either rest the existing database user 's password and add it in env.php file or create a new database username and password both add add it in env.php file 

 

Right now also this details is there in env.php file so you need to replace this details with newer database username and password 

 

that will help you to resolved this error !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

3 REPLIES 3

Re: Site down: main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost'

Hi @usman_hussain

 

Looking at the error log you have posted , the issue is either your database user is removed or database user 's password is changed  and that's the reason its not accessible to the database !

 

so do one thing either rest the existing database user 's password and add it in env.php file or create a new database username and password both add add it in env.php file 

 

Right now also this details is there in env.php file so you need to replace this details with newer database username and password 

 

that will help you to resolved this error !

if issue solved,Click Kudos & Accept as Solution

Re: Site down: main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost'

Changed the password in etc/env.php. Site is working now.
Thank you for this kind help.
Cheers.

Re: Site down: main.CRITICAL: SQLSTATE[28000] [1045] Access denied for user '(removed)'@'localhost'

Hi @usman_hussain

 

Glad to know that its worked for you !

 

Happy to help and keep helping Smiley Happy

if issue solved,Click Kudos & Accept as Solution