[英]How to use phpPgAdmin with Postgres
I have installed Postgres 8.4 on Centos 6.4 64 bit by yum. 我已经在Centos 6.4 64位上安装了Postgres 8.4。 I want to manage Postgres Databases with phpPgAdmin-5.0.4-1 installed by yun too (like MySQL and phpMyadmmin) After install phpPgAdmin-5.0.4-1 I cannot login to phpPgAdmin by access 192.168.7.4/phpPgAdmin/ (192.168.7.4 is my Centos server), it always says "Login failed" although I'm sure that I enter username (postgres) and password right Here are my information, hope you can help :
我想用yun安装的phpPgAdmin-5.0.4-1来管理Postgres数据库(比如MySQL和phpMyadmmin)安装phpPgAdmin-5.0.4-1之后我无法通过访问192.168.7.4/phpPgAdmin/(192.168.7.4)登录到phpPgAdmin是我的Centos服务器),它总是说“登录失败”,虽然我确定我输入用户名(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
Thanks in advance. 提前致谢。
Your setup if fine except for pg_hba.conf
which lacks an entry for 192.168.7.4
. 你的设置很好,除了没有
192.168.7.4
条目的pg_hba.conf
。
Consider adding it and reload the postgresql service: 考虑添加它并重新加载postgresql服务:
host all all 192.168.7.4/32 md5
I tried the above solution but still got the 'Login Failed' message. 我尝试了上述解决方案,但仍然收到“登录失败”消息。 To resolve, I had to ensure IPv6 is set to
password
in the pg_hba.conf
file. 要解决这个问题,我必须确保在
pg_hba.conf
文件中将IPv6设置为password
。 So do: vi /var/lib/pgsql/9.4/data/pg_hba.conf
and edit accordingly. 所以:
vi /var/lib/pgsql/9.4/data/pg_hba.conf
并进行相应的编辑。 Then restart both httpd & postgresql (whatever the version you are using) 然后重启httpd和postgresql(无论你使用的是什么版本)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.