Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql 如何在Postgres中使用phpPgAdmin_Postgresql_Phppgadmin - Fatal编程技术网

Postgresql 如何在Postgres中使用phpPgAdmin

Postgresql 如何在Postgres中使用phpPgAdmin,postgresql,phppgadmin,Postgresql,Phppgadmin,我已通过yum在Centos 6.4 64位上安装了Postgres 8.4。我想用云也安装的phpPgAdmin-5.0.4-1管理Postgres数据库(比如MySQL和phpMyAdmin) 安装phpPgAdmin-5.0.4-1后,我无法通过访问192.168.7.4/phpPgAdmin/(192.168.7.4是我的Centos服务器)登录到phpPgAdmin,它总是说“登录失败”,尽管我确信我正确输入了用户名(postgres)和密码 以下是我的信息,希望您能提供帮助: net

我已通过yum在Centos 6.4 64位上安装了Postgres 8.4。我想用云也安装的phpPgAdmin-5.0.4-1管理Postgres数据库(比如MySQL和phpMyAdmin) 安装phpPgAdmin-5.0.4-1后,我无法通过访问192.168.7.4/phpPgAdmin/(192.168.7.4是我的Centos服务器)登录到phpPgAdmin,它总是说“登录失败”,尽管我确信我正确输入了用户名(postgres)和密码 以下是我的信息,希望您能提供帮助:

netstat -tupln | grep postmaster
tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      771/postmaster
tcp        0      0 :::5432                     :::*                        LISTEN      771/postmaster

/etc/phpPgAdmin/config.inc.php
$conf['servers'][0]['desc'] = 'PostgreSQL';
$conf['servers'][0]['host'] = '192.168.7.4';
$conf['extra_login_security'] = false;

/var/lib/pgsql/data/postgresql.conf
listen_addresses = '*'

/var/lib/pgsql/data/pg_hba.conf
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          ident
# IPv6 local connections:
host    all         all         ::1/128               ident

提前感谢。

如果您的设置正常,除了
pg_hba.conf
没有
192.168.7.4
的条目外

考虑添加它并重新加载postgresql服务:

host all all 192.168.7.4/32 md5 托管所有192.168.7.4/32 md5
我尝试了上述解决方案,但仍然收到“登录失败”消息。为了解决这个问题,我必须确保在
pg_hba.conf
文件中将IPv6设置为
password
。也要这样做:
vi/var/lib/pgsql/9.4/data/pg_hba.conf
并进行相应的编辑。然后重新启动httpd和postgresql(无论您使用的是什么版本)