首页 > 解决方案 > Django 收到“FATAL: password authentication failed for user”,即使用户 crendntical 是正确的

问题描述

一些背景知识:我正在尝试在 Windows 上安装拱门项目。在一些问题之后,我看到建议在 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.

还:

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

标签: djangopostgresqlpython-3.6

解决方案


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


推荐阅读