psycopg2.OperationalError: FATAL: password authentication failed for user "postgres" - - -


postgres連接數據庫進行數據連接時出現下面着這樣的錯誤:

conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

psycopg2.OperationalError: FATAL:  password authentication failed for user "postgres" - - -

 

 

 

這是我的解決方案:

 

首先進入postgresql更改pg_hba.conf配置:

 

全部改為trust,然后重啟服務器,就可以連接使用了

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM