I have deployed my project on my webserver. The .env contains the right settings for the web database but for some reason Laravel still try to connect to localhost.
The problem is that if I use any of the php artisan xxx:clear, it gives the same error:
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' ...
So I can I force Laravel 8 to clear the cache (as I guess this is the problem) and read the correct credentials in the .env file?
php artisan config:clear
for clear env data - staconfig > databse.php
and into thebootstrap
folder, probably you will find acache
folder .. deletecache
folder .... I think it will be okay.. - نور