[英]Django receives "FATAL: password authentication failed for user" even though user crendntical are correct
一些背景:我正在嘗試在 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.
還:
ALTER USER kali WITH PASSWORD 'xxxxxxxx';
設置了它的密碼ALTER USER kali WITH PASSWORD 'xxxxxxxx';
psql -U kali -d jerarch
工作正常,並且只能使用我之前設置的密碼(意味着ALTER USER
工作)。PG_SUPERUSER
和PG_SUPERUSER_PW
根據需要定義。我真的不知道還能做什么。 謝謝
所以就在發布問題之前,我發現問題是重復的postgresql
環境:一個在我的 Windows 上運行,另一個在虛擬 Ubuntu 上運行。
使用 Ubuntu cli for psql
解決了 Ubuntu postgres,而出於某種原因,Ubuntu 上的djnago
解決了 Window 的 postgres。 kali
用戶也在那里進行了 atcually 配置,但使用了另一個密碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.