SQLSTATE[08006] [7] 连接到“pgsql”(172.20.0.2)的服务器,端口 5432 失败:致命:用户 Laravel Sail 的密码身份验证失败

问题描述 投票:0回答:1

我正在将 Laravel Sail 与 WSL 2 和 pgSQL 一起使用,并且在连接到数据库和运行迁移时遇到问题。它在其他设备和我的同事上都有效,但现在我遇到了问题,我不知道该怎么办。

我附上屏幕截图以供参考。

环境 enter image description here

docker-compose enter image description here

配置/数据库.php enter image description here

起航 enter image description here enter image description here

工匠移民 enter image description here

我尝试过重建 Sail、更改密码,甚至在从 Microsoft Store 下载的另一个 Ubuntu 实例上进行设置。我已卸载 WSL,重新安装它,并重新部署该项目。总的来说,我很茫然。

php laravel postgresql wsl-2 laravel-sail
1个回答
0
投票

哟。

您可能在 postgres 中启用了 scram,但数据库具有旧的 md5 样式或更糟糕的密码样式,或者可能是其他方式...

检查一下。

https://www.postgresql.org/docs/current/auth-password.html

© www.soinside.com 2019 - 2024. All rights reserved.