gpt4 book ai didi

PHP Laravel : Access denied for user 'homestead' @'localhost' (using password: YES)

转载 作者:太空宇宙 更新时间:2023-11-03 11:28:40 26 4
gpt4 key购买 nike

有人可以解释为什么我会收到这个错误以及如何解决这个问题吗?我阅读了几个相同的 stackoverflow 问题,但仍然无效。

 PDOException in Connector.php line 119:
SQLSTATE[HY000] [1045]
Access denied for user 'homestead'@'localhost' (using password: YES)

我的 .env 文件

APP_ENV=local
APP_KEY=base64:pAoq6D+Xq2VXHQ9/z1f2ecd5gD104FfBnp5w/UVTV0Q=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=

感谢您的关注。

我读过的链接:

SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

QueryException SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

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

最佳答案

尝试像这样清除配置缓存:

php artisan config:cache

关于PHP Laravel : Access denied for user 'homestead' @'localhost' (using password: YES),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51879799/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com