Access denied for user 'homestead@localhost' .. in laravel 5

后端 未结 11 2435
甜味超标
甜味超标 2021-02-10 10:01

I use the command php artisan migrate to migrate my db in laravel 5 .. it gives me an error:

exception \'PDOException\' with message \'SQLSTATE[HY000] [10

11条回答
  •  我寻月下人不归
    2021-02-10 10:27

      'mysql' => [
                    'driver' => 'mysql',
                    'host' => env('DB_HOST', '127.0.0.1'),
                    'port' => env('DB_PORT', '3306'),
                    'database' => 'laravel',
                    'username' => 'root',
                    'password' => 'PASSWORD IF HAVE OTHERWISE LEAVE IT BLANK ',
                    'unix_socket' => env('DB_SOCKET', ''),
                    'charset' => 'utf8mb4',
                    'collation' => 'utf8mb4_unicode_ci',
                    'prefix' => '',
                    'strict' => true,
                    'engine' => null,
                ],
    

    REMOVE THE ENV values from db,host and password and put them direct

提交回复
热议问题