我尝试psql时出现Postgresql错误

时间:2017-08-10 15:21:56

标签: 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

1 个答案:

答案 0 :(得分:0)

首先启动服务器:

../ bin / pg_ctl start

然后连接到数据库

psql dbname