当我尝试 psql 时出现 Postgresql 错误

标签 postgresql

我收到这个错误,,

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"?

有什么问题?我在 Ubuntu 17.04 x64 上使用 postgresql 9.6

最佳答案

postgres deamon 是否在运行,即输出是什么

pg_lsclusters -h

?如果它没有运行,你可以使用

/etc/init.d/postgresql start

开始吧。

关于当我尝试 psql 时出现 Postgresql 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45617727/

相关文章:

django - 加入不相关的模型并从查询集中删除重复项

arrays - Postgresql 从数组中的值中选择

ruby-on-rails-3 - ActiveRecord 查询对我的小脑袋来说太难了

postgresql - 限制 db 用户对 google cloud sql 的权限

sql - 在 Postgres 中使用 MAX 函数或 DESC 的最大记录

ruby-on-rails - 用户 first_name last_name 字段创建一个 full_name 字段

sql - Postgres 查询代表的年度销售报告。按月分组

ruby-on-rails - Rails 更改列类型并更新列值

postgresql - 如何在分区表上创建索引?

postgresql - Postgres 提交是否可以存在于具有异常 block 的过程中?