SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES) (SQL: select * from
sessions
whereid
= 5LjbnRlwE3geaENWE0YzXxFWjM8I33e4L4WY4GTd limit 1)
Note - I have deployed the project on live server and everything was working perfectly. But suddenly, when i visited the site today, this shows me the following error. I have removed the config.php
from bootstrap folder too.
CodePudding user response:
It's look like database credential wrong.
If it is not, clear config cache
php artisan config:clear
php artisan cache:clear
CodePudding user response:
Have you changed the config of your website.
Try:
php artisan config:clear
Or you can use
php artisan optimize:clear
to clear all caches.
If nothing changes check your session config and database config. The problem is related to these.
The docs: