【问题标题】:Django receives "FATAL: password authentication failed for user" even though user crendntical are correctDjango 收到“FATAL: password authentication failed for user”,即使用户 crendntical 是正确的
【发布时间】:2020-02-29 09:12:04
【问题描述】:

一些背景: 我正在尝试在 Windows 上安装 arches project。在遇到一些问题后,我看到建议在 Linux 上运行它,所以现在我在 Windows 的 Ubuntu 终端上运行。

至于错误: 第一步是运行python manage.py setup_db 命令。它失败了:

FATAL:  password authentication failed for user "kali"

Error connecting to db with these settings: dbname=jerarch user=kali host=localhost port=5432

Have you created the database yet? The quickest way to do so is to supply Postgres superuser credentials in the PG_SUPERUSER and PG_SUPERUSER_PW settings, and then re-run this same command.

还有:

  • 用户“kali”存在,我使用ALTER USER kali WITH PASSWORD 'xxxxxxxx';设置了它的密码
  • psql -U kali -d jerarch 可以正常工作,并且只能使用我之前设置的密码(意味着ALTER USER 有效)。
  • PG_SUPERUSERPG_SUPERUSER_PW 根据需要定义。

我真的不知道还能做什么。谢谢

【问题讨论】:

    标签: django postgresql python-3.6


    【解决方案1】:

    所以在发布问题之前,我发现问题出在重复的 postgresql enivronments:一个在我的 Windows 上运行,另一个在虚拟 Ubuntu 上运行。
    使用psql 的Ubuntu cli 解决了Ubuntu postgres,而出于某种原因,Ubuntu 上的djnago 解决了Window 的postgres。 kali 用户也已在那里配置,但使用了另一个密码。

    【讨论】:

      猜你喜欢
      • 2019-06-23
      • 2021-11-06
      • 2021-10-19
      • 1970-01-01
      • 2013-03-26
      • 1970-01-01
      • 2021-07-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多