Have you created a .env or set the correct environment variables in Forge?
Apr 17, 2016
6
Level 2
Access denied for user 'forge'@'localhost' (using password: NO)
Hi - I'm trying to deploy my laravel with App with forge.
However, i get the following error:
Access denied for user 'forge'@'localhost' (using password: NO)
I'm using digital ocean and forge created the droplet by it self. I think the error is from the database.php - But i'm not sure what's wrong. Does this looks ok?
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
],
Also i'm experiencing some issues, when i try to connect to the database using mySql workbench - i can't connect with the information on the email, i've tried with multiple droplets.
Would love your input !! :)
Level 104
So, just to confirm:
- You have generated a key using
php artisan key:generate? - This key is in your
.envfile under aAPP_KEYkey? - Your
config/app.phphas a key'key' => env('APP_KEY')?
If all of these are in place you should be right. Come back if there are any errors.
4 likes
Please or to participate in this conversation.