"Access denied for user ''@'localhost' to database 'forge" appears randomly

Try php artisan clear:cache to clear your cache and re-configure your cache php artisan config:cache it might works for you .


PLEASE RUN THIS COMMAND

php artisan cache:clear 

THEN

php artisan config:cache

This seems to hold most of the answers : Laravel 5.2 not reading env file

Remember to not to edit your core files as one of the users said. Just do the safe checks, clear cache, should work.

Hope it helps.

As a workaround you can add to your DB forge account with all privileges.