我想在ubuntu中安装postgresql,但面对很多问题,我搜索了很多次,但仍然没有成功,所以当我尝试安装时,我使用了以下命令:
sudo su -
apt-get install postgresql-9.5
update-rc.d postgresql enable安装完成后,会显示以下错误:
9.5 main 5432 down postgres /var/lib/postgresql/9.5/main /var/log/postgresql/postgresql-9.5-main.log然后当我发出以下命令时
sudo -i -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.5432"?我该如何解决这个问题呢?
发布于 2020-01-24 22:03:57
在Postgres中,您需要以名为postgres的特定用户身份进行连接。
尝试这样做:先使用sudo -i -u postgres,然后使用psql
https://stackoverflow.com/questions/59897877
复制相似问题