Question

I have installed Postgres 8.4 on Centos 6.4 64 bit by yum. 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 :

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.

Was it helpful?

Solution

Your setup if fine except for pg_hba.conf which lacks an entry for 192.168.7.4.

Consider adding it and reload the postgresql service:

host    all         all         192.168.7.4/32          md5

OTHER TIPS

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. So do: vi /var/lib/pgsql/9.4/data/pg_hba.conf and edit accordingly. Then restart both httpd & postgresql (whatever the version you are using)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top