使用phpPgAdmin / PGSQL进行身份验证问题

时间:2016-03-16 10:39:19

标签: postgresql phppgadmin

我遇到了运行SIlverpeas项目需要安装的PostgreSQL的一些问题。

通常情况下,postgres部分配置正确,因为我发送了一个命令,让用户的silverpeas拥有数据库silverpeas,我可以使用“pgsql -U silverpeas silverpeas”通过ssh连接

现在,我正在努力使我的phpPgAdmin工作。他与Postgresql(版本9.5)位于同一服务器Centos 6.7上。

当我尝试连接时,我有连接失败的消息,有时,当我尝试解决问题时,我有“试图破解你的系统”的消息。

当我正在寻找pgsql日志文件时,在连接试用后,我有这样的消息:

< 2016-03-16 11:32:39.378 CET >LOG:  could not connect to Ident server at address "::1", port 113: Connection refused
< 2016-03-16 11:32:39.378 CET >FATAL:  Ident authentication failed for user "silverpeas"
< 2016-03-16 11:32:39.378 CET >DETAIL:  Connection matched pg_hba.conf line 84: "host    all             all             ::1/128                 ident"

问题是,我的/var/lib/pgsql/9.5/data/pg_hba.conf是这样的:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
host    all             all             10.1.1.0/8              md5

如果我查找/var/lib/pgsql/9.5/data/postgresql.conf文件:

listen_addresses = 'localhost'

我的phpPgAdmin配置是:

// use 'localhost' for TCP/IP connection on this computer
        $conf['servers'][0]['host'] = 'localhost';

        // Database port on server (5432 is the PostgreSQL default)
        $conf['servers'][0]['port'] = 5432;

        // Database SSL mode
        // Possible options: disable, allow, prefer, require
        // To require SSL on older servers use option: legacy
        // To ignore the SSL mode, use option: unspecified
        $conf['servers'][0]['sslmode'] = 'allow';

        // Change the default database only if you cannot connect to template1.
        // For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
        $conf['servers'][0]['defaultdb'] = 'silverpeas';

建议?

1 个答案:

答案 0 :(得分:0)

pg_hba.conf文件与日志文件不匹配。 你使用md5方法(好),但日志文件谈论ident方法。

您之前是否更改并重新加载了postgresql conf?

相关问题