Reputation: 1131
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?
Upvotes: 2
Views: 15278
Reputation: 1
took me 3 hours to find out that my original env file is in another folder, and i opened "backup" folder in my code :D
Upvotes: 0
Reputation: 527
The Optimize command still works like champ Try
php artisan optimize
It will clear
Upvotes: 1
Reputation: 86
hey you can use these commands
php artisan config:cache
php artisan config:clear
php artisan cache:clear
thanks :)
Upvotes: 5