fe_sendauth:postgresql + laravel中没有提供密码错误

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (1)
  • 关注 (0)
  • 查看 (19)

我试图在Laravel应用程序中运行数据库迁移。但是,我一直收到错误:

[PDOException]                                         
SQLSTATE[08006] [7] fe_sendauth: no password supplied 

经过一些研究,我通过在最后一行(下面)添加一个条目来编辑我的pg_hba.conf文件。然后我重新加载了数据库的配置设置:

SELECT pg_reload_conf();

我试图再次运行迁移,但我仍然得到相同的no password supplied错误。有人可以帮忙吗?提前致谢!

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     user                                  trust
#host    replication     user          127.0.0.1/32            trust
#host    replication     user          ::1/128                 trust
host all all 127.0.0.1/32 trust <--- this is my entry
提问于
用户回答回答于

我解决了这个错误,运行“php artisan config:clear”和wo

扫码关注云+社区

领取腾讯云代金券