在使用如下命令打开PostgreSQL

psql -U postgres

提示psql: 致命错误:  对用户"postgres"的对等认证失败

 

使用如下命令找到postgreSQL的配置文件,vi进入该文件进行修改

find / -name pg_hba.conf

或者

locate pg_hba.conf

将peer改为MD5

致命错误:  对用户"postgres"的对等认证失败

 

 

致命错误:  对用户"postgres"的对等认证失败

 

 

然后重启服务:

service postgresql restart
或者:
systemctl restart postgresql

相关文章:

  • 2021-08-18
  • 2021-12-30
  • 2021-12-28
  • 2021-12-03
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2021-07-11
  • 2021-09-02
  • 2022-12-23
相关资源
相似解决方案