0

I'm using drupal 8 & MySQL 5.7.28 After I change the root password in MySQL database. then change the credentials in sites/default/settings.php. The website shows the following error The website encountered an unexpected error. Please try again later. Also I check apache logs but there is no error related to the database. UPDATE I found the following error in the mysql server logs.

[Note] Access denied for user 'root'@'DBIP' (using password: YES)

the following command I run to update the root password

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
FLUSH PRIVILEGES;

any advice.

IDI
  • 175
  • 1
  • 14
  • maybe a typo in one of them look in `/sites/default/settings.php` and eventually change the password again – nbk Jul 12 '21 at 12:59
  • @nbk I try to change the password with no luck, also I write the old password, and the site goes back again [without resetting the root password to the old one]. – IDI Jul 12 '21 at 13:09
  • you have to flush also the privileges see https://stackoverflow.com/a/42484420/5193536 FLUSH PRIVILEGES; – nbk Jul 12 '21 at 13:11
  • @nbk I did with no luck – IDI Jul 12 '21 at 13:17
  • after changing the password, can you access the database, in such cases u have usually the wrong database, – nbk Jul 12 '21 at 14:24
  • @nbk please check the update above – IDI Jul 12 '21 at 18:33
  • there are another way see https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html – nbk Jul 12 '21 at 18:37

0 Answers0