3

I am using magento 2.3.4 version and i am keep getting this error Multiple times

main.CRITICAL: SQLSTATE[HY000] [2002] Connection refused {"report_id":"d953b23017cc156845a623c7225f2e281cf201d080f960026cb40a49fcdaf44b","exception":"[object] (Zend_Db_Adapter_Exception(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/html/vectorx/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:144, PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/html/vectorx/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128)"} []

I tried searching and I found renaming localhost to 127.0.0.1 but this is not working for me how can I solver this error

6
  • you change app/etc/env.php file ??? May 20, 2020 at 4:08
  • i just change localhost to 127.0.0.1 no other changes made
    – NsVentures
    May 20, 2020 at 6:25
  • Yes, but same changes in env.php file??? May 20, 2020 at 6:46
  • yes i have only made changes in env.php file
    – NsVentures
    May 20, 2020 at 12:48
  • try to core_config_data table May 20, 2020 at 12:49

1 Answer 1

0

Try changing host from localhost to 127.0.0.1 in app/etc/env.php

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.