小编Jay*_*eri的帖子

带有“信任”选项的 PostGreSQL 身份验证失败

我正在尝试在 Ubuntu 12.04 上使用 PostGreSQL 9.1 设​​置 PostGIS 数据库。我已经设置了数据库,创建了一个没有密码的用户帐户“jay”,在此处添加了第 2.5 节之后的空间功能,并将我的 pg_hba.conf 设置为local

# "local" is for Unix domain socket connections only
local   all             all                                     trust
Run Code Online (Sandbox Code Playgroud)

我可以使用 PGAdminIII 连接到数据库,无需密码即可连接,但是当我尝试通过 PostGIS 或 QuantumGIS 连接时连接失败。这是 QuantumGIS 中连接窗口的屏幕截图:
PostGIS 连接

稍微调查一下问题,我遇到了这篇文章,这让我尝试使用psql -U jay -h localhost gis. psql提示我输入密码,因为我没有设置密码,我按回车键,然后它返回psql: fe_sendauth: no password supplied. 我再次尝试,这次提供我的 Ubuntu 用户密码,它返回

psql: FATAL:  password authentication failed for user "jay"
FATAL:  password authentication failed for user "jay"
Run Code Online (Sandbox Code Playgroud)

然后,我尝试了设置密码jay使用 …

postgresql ubuntu-12.04

3
推荐指数
1
解决办法
4802
查看次数

标签 统计

postgresql ×1

ubuntu-12.04 ×1