in my case (laravel 5+) i had to wrap my password in single quotation marks and clear config cache:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=user_name
DB_PASSWORD='password'
and then run:
php artisan config:clear