[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Starting with postgreSQL and pgaccess



Joost Kooij wrote:
  >On Tue, Jul 17, 2001 at 04:30:57PM +0000, Victor wrote:
  >>                      I'm in trouble using pgaccess. After trying to
  >> open the same db giving its name and postgres as user it invariably
  >> answers:
  >> 
  >> Connection to database failed ConnectDB().....Connection refused: Is
  >> the postmaster running (with -i) at localhost and accepting
  >> connections on TCP/IP port 5432?
  >
  >You must enable postgresql to listen to tcp/ip sockets.  By default it will
  >only listen to local unix domain sockets.  The version of Pgaccess that you
  >have can only connect to postgresql through the tcp/ip socket interface.
  >
  >IIRC you have to change the file /etc/postgresql/pg_hba.conf
  >Make it only listen to 127.0.0.1, that is all pgaccess on the local
  >host requires.

1. If you have nothing in the host field in pgaccess' connection dialog,
it will use Unix sockets rather than TCP/IP.  If you have 'localhost'
in there, it will use TCP/IP, even though it never even gets as far as
the network card.

2. pg_hba.conf is for defining authorisation methods. 
Edit /etc/postgresql/postmaster.init (at 7.1 this is postgresql.conf instead)
to define whether the postmaster allows TCP/IP connections.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Finally, all of you, live in harmony with one another;
      be sympathetic, love as brothers, be compassionate and
      humble. Do not repay evil for evil or insult for
      insult, but with blessing, because to this you were
      called so that you may inherit a blessing."  
                                          I Peter 3:8,9 




Reply to: