通过PgAdmin III连接到PostgreSQL时,身份验证失败错误 [英] Ident authentication failed error when connecting to PostgreSQL via PgAdmin III

查看:711
本文介绍了通过PgAdmin III连接到PostgreSQL时,身份验证失败错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用PgAdmin III从实例所在的同一台计算机连接到我的postgres服务器实例,但是尝试连接时始终出现身份验证失败"错误.在这里,我形成的步骤旨在尝试实现连接性:

I'm trying to connect to my postgres server instance using PgAdmin III from the same machine the instance is on, but I keep getting the "Ident authentication failed" error when trying to connect. Here the steps I formed performed to try to achieve connectivity:

我在Postgres中创建了一个名为"pguser1"的新用户: 用户pguser1

I created a new user in Postgres called 'pguser1': user pguser1

我修改了pg_hba.conf文件以使用md5身份验证: 具有md5身份验证的pg_hba.conf

I modified my pg_hba.conf file in order to use md5 authentication: pg_hba.conf with md5 auth

然后我尝试通过pgAdminIII连接,但没有成功.

I then tried to connect via pgAdminIII, but I've had no success.

我想念什么?

谢谢.

推荐答案

您是为用户创建了 md5 密码还是更新了用户?

Did you create a md5 password for the user or update the user?

如果没有,这可能会帮助

If not this may help

U=pguser1; P=yourpassword; echo -n md5; echo -n $P$U | md5sum | cut -d' ' -f1 

将产生一个md5密码. md575a63f65a68540d053ec41f410d9ab24

Which produces an md5 password. md575a63f65a68540d053ec41f410d9ab24

因此,下一步将是更新/创建用户密码.

So the next step would be to update/create the user password .

CREATE USER theuser PASSWORD 'md575a63f65a68540d053ec41f410d9ab24'; 

ALTER USER postgres password 'md575a63f65a68540d053ec41f410d9ab24'; 

然后您可以使用(在这种情况下)

You could then login with (in this case)

user pguser1 Password: yourpassword

祝一切顺利

这篇关于通过PgAdmin III连接到PostgreSQL时,身份验证失败错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆