|
From: Michael R. <mi...@da...> - 2012-07-30 17:09:47
|
On Mon, 30 Jul 2012 16:40:46 +0100 lejeczek <pe...@ya...> wrote: > thanks Michael for clarifying things for me, however > I'm still not sure I get the hang of these users/password > relations > davical server runs just fine, now for postgres the dba is > postgres as per default installation, yet when I try these I > get, probably common: > > stage2: SQLSTATE[08006] [7] could not connect to server: > Permission denied Is the server running on host "localhost" > and accepting TCP/IP connections on port 5432? > > I did tamper with pg_hba.conf so to test it I get connection > locally and remotely as postgres user > I'm at loss to follow this, > any thoughts? > The user postgres will, by default, only be allowed to connect via a unix socket on localhost which is configured by this line: local all all ident What I would suggest for you to do is the following: As root 1) createuser -P -s sys 2) Add this line as the first line after the first line starting by host in the file pg_hba.conf: host all sys 127.0.0.1/32 md5 3) restart postgresql Use this newly created user as postgres dba -- Hilsen/Regards Michael Rasmussen Get my public GnuPG keys: michael <at> rasmussen <dot> cc http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E mir <at> datanom <dot> net http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C mir <at> miras <dot> org http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 -------------------------------------------------------------- |