Database 如何在新安装后连接到pgadmin

Database 如何在新安装后连接到pgadmin,database,postgresql,pgadmin,Database,Postgresql,Pgadmin,当我尝试使用用户名'postgres'连接到pgadmin,但没有密码时,它会显示: Error connecting to the server: FATAL: Peer authentication failed for user "postgres" 如何修复此问题?您是否在pg_hba.conf中设置了正确的设置 看看怎么做 您的pg_hba.conf是什么样子的?将对等点更改为信任字符串或只添加第一行: 本地所有博士后信托基金 如中所述 然后运行pg_ctl reload我刚刚将侦

当我尝试使用用户名'postgres'连接到pgadmin,但没有密码时,它会显示:

Error connecting to the server: FATAL:  Peer authentication failed for user "postgres"

如何修复此问题?

您是否在pg_hba.conf中设置了正确的设置

看看怎么做


您的pg_hba.conf是什么样子的?

将对等点更改为信任字符串或只添加第一行: 本地所有博士后信托基金 如中所述 然后运行pg_ctl reload

我刚刚将
侦听地址='localhost'
更改为
侦听地址='localhost'