Thread: Opening database with PGACCESS
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 currentlyconnected to the database: mydb mydb=> " Which is the problem? How can I fix it? Thanks, Rodney.
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 mydbusing "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 ID32B8FAA1 ======================================== "All scripture is given by inspiration of God, andis profitable for doctrine, for reproof, for correction, for instruction in righteousness;" II Timothy 3:16
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
>>>>> "oe" == Oliver Elphick <olly@lfix.co.uk> writes: rod> "Error connecting database. Connection to database failed rod> connectDB() failed: Is the postmaster running and acceptingrod> TCP/IP (with -i) connections at 'localhost' on port '5432'" rod> rod> The postmaster is running and I canconnect 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