Re: error connecting to database

From: sklassen(at)commandprompt(dot)com
To: Alexander Cohen <alex(at)toomuchspace(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: error connecting to database
Date: 2004-10-01 18:49:54
Message-ID: 20041001114954.A13387@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Alexander Cohen <alex(at)toomuchspace(dot)com> [2004-10-01 14:42:07 -0400]:

> Im trying to connect locally to a database on a running postgres
> cluster. If i connect with psql, everything is fine and i can transact.
> I i try and connect in my own app, i get this error:
>
> Could not connect to server: permission denied.
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"
>
> I know for a fact postgres is running, i can see with <ps> and also
> <top> in the terminal on Mac OSX 10.3.5.

Try 'netstat -ntpl' intead to see if it's listening.

> What exctly does this error message mean? What permissions is this
> error talking about?

That typically means that you're connecting via the local unix socket
instead of the tcp port. If your application is trying to do the
latter you'll want to uncomment the tcp_socket setting in
postgresql.conf and restart.

--
Steven Klassen - Lead Programmer
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Replication & Support Services, (503) 667-4564

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2004-10-01 18:54:55 Re: Random not so random
Previous Message Alexander Cohen 2004-10-01 18:42:07 error connecting to database