我正在尝试使用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时,身份验证失败错误
发布评论