I have an application with Laravel 4, that runs in localhost correctly, but when I uploaded it in my host I received the error .
app>config>database.php file is:
This worked for me:
php artisan config:clear
Even though I changed the config details in the .env file, I was getting the Access denied error. Running the above command will clear configuration cache file and hence laravel will read the fresh data from the .env file.
config
.env