Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

You have forge in one section and homestead in the other match the two and see if it works.

0

this is the fallback, it has nothing to do with it. After the "," is for using as a fallback, when I have no informations in the .env :-)

0

@heyalbert, did you try restarting MySQL? config seems ok so i guess it's a server problem

0

What's your default database driver set to? It's in param default in config/database.php.

And can you connect to db with mysql console client?

0

hey albert

had the same problem fixed it with adding this line in the .env file

'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',

so your .env file code should loook like this

    'mysql' => [
        'driver' => 'mysql',
        'host' => env('DB_HOST', '127.0.0.1'),
        'port' => env('DB_PORT', '8889'),
        'database' => env('DB_DATABASE', 'linda'),
        'username' => env('DB_USERNAME', 'root'),
        'password' => env('DB_PASSWORD', 'root'),
        'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix' => '',
        'strict' => fasle,
        'engine' => null,
    ],
0

Sign in to participate in this thread!

Eventy

Your banner here too?

heyalbert heyalbert Joined 11 Jun 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.