Laravel 5 错误 SQLSTATE[HY000] [1045] 用户“homestead”@'localhost' 的访问被拒绝(使用密码:YES)
我已成功安装Laravel 5并将数据库中的MySQL凭据.php配置文件更改为”
mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'wdcollect'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
我不想使用宅基地,我已将 .env 文件更改为
APP_ENV=local
APP_DEBUG=true
APP_KEY=apLIzEMOgtc5BUxdT9WRLSvAoIIWO87N
DB_HOST=localhost
DB_DATABASE=wdcollect
DB_USERNAME=root
DB_PASSWORD=
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
我不明白为什么说“homestead”@'localhost'的访问被拒绝