通过PgAdmin III连接到PostgreSQL时,身份验证失败错误

编程入门 行业动态 更新时间:2024-10-25 14:30:12
本文介绍了通过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时,身份验证失败错误

本文发布于:2023-10-13 17:29:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1488631.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   身份验证   错误   PgAdmin   III

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!