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?

  • Did you do anything ,such as an upgrade or add a module, before this error? Did you check etc/env.php for the correct DB username and password? Would the username or password on the database have changed for any reason?
    – andyjv
    Sep 14, 2018 at 19:20
  • yes, I did installed a module via admin panel added via the marketplace-magento. Just now I opened the env.php file and I have noticed that my database username is the same but passport is different. Shall I change it? P.S I am a non-tech guy. Sep 14, 2018 at 19:37
  • Changed the password in etc/env.php. Site is working now. Thank you for this kind help. Cheers. Sep 14, 2018 at 19:41
  • I added my comment as an answer, please mark it as accepted
    – andyjv
    Sep 14, 2018 at 23:25

1 Answer 1


Answered in the comments:

Check to make sure the database username and password are correct in etc/env.php

  • Changed the password in etc/env.php It's working now. Thank you. Sep 15, 2018 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.