0

I'm slowly losing my mind. I tried to install postgresql on WSL Arch but I can't connect to it. The error I'm getting when I try to run 'psql' is:

psql: error: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?

Like the error says, there's no 'run' folder. I don't know how to configure it if I can.

I'm using WSL2. I tried stopping/starting with systemctl. It is running but can't connect.

  • Try connecting through TCP: `psql -h localhost ...` (or whatever hostname you need to use in that setup) –  Jul 03 '21 at 19:30
  • @a_horse_with_no_name Thanks a lot. I also got an error but followed https://stackoverflow.com/a/41161674/10433155 this answer and it worked. Do I have to launch like this every time or is there a solution to this? – Ogulcan Bozkurt Jul 03 '21 at 19:50

0 Answers0