Laravel 5 错误 SQLSTATE[HY000] [1045] 用户 'homestead'@'localhost' 的访问被拒绝(使用密码:YES)
我已成功安装 Laravel 5,并将配置目录中 database.php 文件中的 MySQL 凭据更改为'
I have installed Laravel 5 successfully and changed MySQL credentials in database.php file in config directory to '
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 文件更改为
I don't want to use homestead and I have changed .env file to
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'的访问被拒绝
I don't understand that why it's saying that access denied for 'homestead'@'localhost'
推荐答案
现在可以了.我不得不重新启动服务器.谢谢
It's working now. I had to restart server. Thanks
相关文章