cancel
Showing results for 
Search instead for 
Did you mean: 

SQLSTATE[HY000] [1045] Access denied for user because of old password

SQLSTATE[HY000] [1045] Access denied for user because of old password

I just installed 2.3.3 yesterday. Today I had to change the password for the database user. I updated the password in env.php and then deleted files in pub/static and var and then ran bin/magento setup:static-content:deploy -f. I also flushed the cache, cleaned the cache, everything I could think of.

 

The admin tool is working just fine. However, the front end is still trying to use the old password. 

 

Here is the first line of the Stack trace that shows the old password is still being used.

 

/home/domain/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(128): PDO->__construct('mysql:host=loca...', 'user', 'old_password', Array)

 

Any ideas? 

4 REPLIES 4

Re: SQLSTATE[HY000] [1045] Access denied for user because of old password

@cynshop try to use the below command and check the results.

 

sudo rm -rf var/cache/*

Thanks

Re: SQLSTATE[HY000] [1045] Access denied for user because of old password

I ran that. It deleted the files in var/cache but nothing changed when I tried to access my site.

Re: SQLSTATE[HY000] [1045] Access denied for user because of old password

@cynshop try to comment the env.php and check if the same error is there on backend and frontend.

 

Thanks

Re: SQLSTATE[HY000] [1045] Access denied for user because of old password

I changed the password in env.php to 1234 (an incorrect password) then deleted all files in var/cache. When I refreshed the admin tool I got an error that showed the incorrect password, as expected. When I refreshed the site page it was exactly the same with the original (now incorrect) password.