postgres连接数据库进行数据连接时出现下面着这样的错误:

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

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

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

 

 

 

这是我的解决方案:

 

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

 

全部改为trust,然后重启服务器,就可以连接使用了

 

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

 

 

 

 

 

相关文章:

  • 2022-01-25
  • 2022-12-23
  • 2021-08-17
  • 2022-12-23
  • 2022-01-25
  • 2021-12-19
猜你喜欢
  • 2021-06-10
  • 2021-05-30
  • 2022-12-23
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
相关资源
相似解决方案