I tried the following:
/usr/bin/initdb --pgdata=/usr/test/databases/pgsql1/data --auth-local=trust
changed unix_socket_directories = '/tmp’ in postgresql.conf.
Then ran:
/usr/bin/postgres -k /tmp -D /usr/tavve/databases/pgsql1/data &
Contents of pg_hba.conf is
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication slanglois trust
#host replication slanglois 127.0.0.1/32 trust
#host replication slanglois ::1/128 trust
Then I try to run psql and
[20:01:11 slanglois@tron bin]$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432”?
I would expect local all all trust to allow me to connect.
|