相关疑难解决方法(0)

无法连接到服务器:Linux 的 Windows 子系统中 ubuntu 上的 postgresql

我在 ubuntu 18.04 发行版中使用 WSL,在我点击的 bash 中,sudo -u postgres 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.5433"?
Run Code Online (Sandbox Code Playgroud)

然后我尝试了其他 postgres 操作,例如:sudo -u createdb mydb 只得到相同的错误。

请指教。

linux windows postgresql ubuntu windows-subsystem-for-linux

8
推荐指数
1
解决办法
2345
查看次数