Le Samedi 06 Décembre 2003 17:53, Ossama Khayat a écrit :
> pg_hba.conf
Dear Ossama,
Sorry for the delay.
1) Make sure that the two files pg_hba.conf and postgresql.conf were saved
under "postgres" user names, not root. Also, after modifying each setting,
run "/etc/init.d/postgresql restart".
2) For debugging connection, the original setting in pg_hba.conf is better:
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
Then, try to connect under postgresql user using a "trusted connection". It
should work, otherwise we have a big problem.
3) Ultimately, turn PostgreSQL server logging on to see what happens.
In postgresql.conf, under user postgres, turn:
syslog = 2
silent_mode = false
log_connections = true
This will write connection information to /var/log/messages
On my system:
Dec 7 10:27:15 station postgres[3746]: [2-1] LOG: connection received:
host=127.0.0.1 port=32830
Dec 7 10:27:15 station postgres[3746]: [3-1] LOG: connection authorized:
user=postgres database=template1
Dec 7 10:27:16 station postgres[3748]: [2-1] LOG: connection received:
host=127.0.0.1 port=32831
Dec 7 10:27:16 station postgres[3748]: [3-1] LOG: connection authorized:
user=postgres database=XXXXXXXXXXXXXXXX
This will give us the required information.
Cheers, Jean-Michel