gpt4 book ai didi

postgresql - map 服务器错误 : FATAL: Ident authentication failed for user "..."

转载 作者:行者123 更新时间:2023-12-04 19:37:35 26 4
gpt4 key购买 nike

我正在尝试在 Centos 6 虚拟机上运行 MapServer 5/PostGIS 安装。
我在我的 cgi-bin 文件夹中部署了 MapServer,但是现在当我查询(使用 firefox)mapserv 文件时
使用网址 [virtual machine local IP]/cgi-bin/mapserv?MAP=/var/www/cgi-bin/[...] ,我得到的只是一张带有以下错误消息的图像:

msDrawMap(): Image handling error. Failed to draw layer named '[name of my layer]'.;msPostGISLayerOpen(): Query error. Database connection failed (FATAL: ident authentification failed for user "foo") with connect string 'user=foo dbname=foo password=foo host=localhost port=5432'



我尝试更改 pg_hba.conf 中的设置,但没有成功。
foo 数据库可以使用 foo 作为 sql 用户和 foo 作为密码使用 psql 命令访问。
我能做些什么 ?

最佳答案

根据 http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html
更改 identmd5为用户 foohba.conf

Obtain the operating system user name of the client by contacting the ident server on the client and check if it matches the requested database user name. Ident authentication can only be used on TCP/IP connections. When specified for local connections, peer authentication will be used instead. See Section 19.3.5 for details.



您可以通过 psql 查看您使用的 hba到您的数据库并运行 show hba_file ;

关于postgresql - map 服务器错误 : FATAL: Ident authentication failed for user "...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37386956/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com