In the windows Linux Subsystem, I installed ubuntu 18.04
In there, I installed postgresql 11 using sudo apt-get install postgresql-11
I got this back
Ver Cluster Port Status Owner Data directory Log file
11 main 5432 down postgres /var/lib/postgresql/11/main /var/log/postgresql/postgresql-11-main.log
When I run "psql", I get the error
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"?
Then I tried to specify a folder, like this
psql -h /var/lib/postgresql/11/main
and I get this error...
psql: could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/var/lib/postgresql/11/main/.s.PGSQL.5432"?
Any hint?
Thanks
Status
=down
you wantStatus
=online
. When it's down, the instance may be started withpg_ctlcluster 11 main start
.apt-get install
does it by default normally but maybe it encountered an error.postgres -D ...
but postgres is not found...whereis postgres
only reports the man pages... Bizarre?/usr/lib/postgresql/11/bin/pg_ctl -D /var/lib/postgresql/11/main -l logfile start
But now I get "waiting for server to start..../bin/sh: 1: cannot create logfile: Permission denied" and the log file exists but is empty...