I changed the password in Magento admin panel and cleared the cache via the dashboard. Then my website went completely offline, only to display the multiple lines of text with the 2 exceptions mentioned.
It seems as though the database information within env.php might be encrypted because it has an additional array.
env.php file:
'crypt' =>
array (
'key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' (//not real key)
The following is the error log received when trying to access site:
Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [1045]
Access denied for user 'root'@'localhost' (using password: YES)Exception #1 (PDOException): SQLSTATE[HY000] [1045] Access denied for
user 'root'@'localhost' (using password: YES)
I'm a non-tech guy with novice experience with web development. Any help would be appreciated!
Best Answer
The error says MySQL credentials are invalid, please check database credentials in
app/etc/env.php
. If the password is not correct, update the right one. If the password is correct, try the below steps.Run the below commands from the Magento root folder
If you are using php-fpm, you need to restart the php-fpm service as well. Please change the below command depends on the PHP version.