2

I recently having an idea of securing my phpmyadmin portal, So i added htaccess and htpasswd to add another layer of protection [![enter image description here][1]][1]

And I realized that my web application is now no longer able to access the connection to my db , since I have added another layer of auth type. I notice that env.php are responsible for taking notes on credential to log in my web app to my db.

So what command line should I add into env.php to enable this authenticate the new layer I had created (.htaccess " auth type: basic ")

Btw my issue originated from (SQLSTATE[HY000] [2002] Permission denied)

{"0":"SQLSTATE[HY000] [2002] Permission denied","1":"#1 Zend_Db_Adapter_Pdo_Mysql->_connect() called at [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]\n#2 Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460

  • Please share the content of env.php? – Mohit Kumar Arora Apr 30 '19 at 10:39
  • updated ,check above – Ed Tan Apr 30 '19 at 10:57
  • 1
    If you are using localhost in the host value, then there should not be such a problem. Please reconfirm. – Mohit Kumar Arora Apr 30 '19 at 10:59
  • what is the issue that might trigger SQLSTATE[HY000] [2002] Permission denied? – Ed Tan Apr 30 '19 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.