Opening database with PGACCESS

Поиск
Список
Период
Сортировка
Искать

Opening database with PGACCESS

От:
rodneyr@embratel.com.br
Дата:
When I try to open my database (mydb) with the pgaccess, I receive the
following message:

"Error connecting database. Connection to database failed
connectDB() failed: Is the postmaster running and accepting
TCP/IP (with -i) connections at 'localhost' on port '5432'"

The postmaster is running and I can connect to mydb using "psql":

> psql mydb

"Welcome to the POSTGRESQL interactive sql monitor: Please read the file COPYRIGHT for copyright terms of POSTGRESQL
  type \? for help on slash commands  type \q to quit  type \g or terminate with semicolon to execute queryYou are currently connected to the database: mydb

mydb=>  "

Which is the problem? How can I fix it?

Thanks,

Rodney.



Re: [INTERFACES] Opening database with PGACCESS

От:
"Oliver Elphick" <olly@lfix.co.uk>
Дата:
rodneyr@embratel.com.br wrote: >When I try to open my database (mydb) with the pgaccess, I receive the >following message: > >"Error connecting database. Connection to database failed >connectDB() failed: Is the postmaster running and accepting >TCP/IP (with -i) connections at 'localhost' on port '5432'" > >The postmaster is running and I can connect to mydb using "psql":


pgaccess uses a TCP/IP connection through localhost, so you have to use the
-i option when starting the postmaster, even though you have no other
machines connecting to it.

--      Vote against SPAM: http://www.politik-digital.de/spam/                ========================================
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver              PGP key from public servers; key ID 32B8FAA1                ========================================    "All scripture is given by inspiration of God, and is      profitable for doctrine, for reproof, for correction,      for instruction in righteousness;"                                              II Timothy 3:16 



Re: [INTERFACES] Opening database with PGACCESS

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
rodneyr@embratel.com.br writes:
> When I try to open my database (mydb) with the pgaccess, I receive the
> following message:
> "Error connecting database. Connection to database failed
> connectDB() failed: Is the postmaster running and accepting
> TCP/IP (with -i) connections at 'localhost' on port '5432'"

> The postmaster is running and I can connect to mydb using "psql":
>> psql mydb

psql defaults to connecting via Unix sockets.  If you make it connect
via TCP (by saying "psql -h localhost mydb") I'll bet it fails too.
Most likely, your pg_hba.conf is set up to allow Unix socket connections
but not TCP connections, not even from localhost.
		regards, tom lane

Re: Opening database with PGACCESS

От:
Eric Marsden <emarsden@mail.dotcom.fr>
Дата:
>>>>> "oe" == Oliver Elphick  writes:
 rod> "Error connecting database. Connection to database failed rod> connectDB() failed: Is the postmaster running and accepting rod> TCP/IP (with -i) connections at 'localhost' on port '5432'" rod>  rod> The postmaster is running and I can connect to mydb using "psql":
 oe> pgaccess uses a TCP/IP connection through localhost, so you have oe> to use the -i option when starting the postmaster, even though oe> you have no other machines connecting to it.

well, there's a trick to get around that. If you provide an empty host
name and port number in the pgaccess connection dialog, it will switch
to a unix socket connection, and will work even without `-i'.

Has worked for me in the past, anyway.  

-- 
Eric Marsden
It's elephants all the way down

FAQ