Michael Durrant
Michael Durrant

Reputation: 96614

postgres psql giving permission denied but I can use pgadmin ok

I get psql: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

but if I use pgadmin I can double click on a db and use it ok.

I think pg is running but permissions issue?

Upvotes: 1

Views: 956

Answers (1)

Erwin Brandstetter
Erwin Brandstetter

Reputation: 659247

Looks like you have set different permissions for connections from Unix-domain sockets and TCP/IP connections. I.e.: different entries in your pg_hba.conf file for local and host. Check the file and add lines for local accordingly.
Reload the server to have it take effect.

BTW.: I use pg_lsclusters on Debian for a quick check which db clusters are installed/running.

Upvotes: 2

Related Questions