I've moved my project but have run into an issue. I'm discovering that the old settings (which have been changed in my .env
to reflect the changed host) are still being used by my project.
I can't access my project through a browser as it returns this error: SQLSTATE[HY000] [1045] Access denied for user 'appReop'@'localhost' (using password: YES) (SQL: select * from `settings` limit 1)
appReop
was the previous login username. And while I could just create a new user to reflect this, I also run into an issue about the old password being too weak for the current database configuration.
When I go to run php artisan cache:clear, it returns the same above error. So I was curious if there was a way to manually clear the caches to fix my errors?
This shows the three errors that pop up after running any Artisan command:
Not sure you have solved this, my suggestion is remove the files inside below folder. So the database connection cache file will create again after removed. (Laravel 5)
/<root>/bootstrap/cache/*
Hope it helps :)
You can call an Artisan command outside the CLI.
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('cache:clear');
// return what you want
});
You can check the official doc here http://laravel.com/docs/5.0/artisan#calling-commands-outside-of-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With