加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

PostgreSQL没有在Mac上运行

发布时间:2020-12-13 16:22:01 所属栏目:百科 来源:网络整理
导读:整个错误如下: psql: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket “/tmp/.s.PGSQL.5432”? 这是我第二次在Mac上通过Homebrew设置Postgresql,我不知道发生了
整个错误如下:

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

这是我第二次在Mac上通过Homebrew设置Postgresql,我不知道发生了什么.以前,它一直在工作.在某些时候,我必须输入一个搞砸事情的命令.我不确定.现在,每当我从命令行输入SQL命令时,我都会收到上述消息.我运行了一个命令来检查服务器是否正在运行,而且显然不是.如果我尝试使用启动服务器

$postgres -D /usr/local/pgsql/data

我收到以下错误:

postgres cannot access the server configuration file
“/usr/local/pgsql/data/postgresql.conf”: No such file or directory

我已经通过Homebrew卸载并重新安装了Postgresql,但问题仍然存在.我完全不知道如何让这个工作.任何帮助,将不胜感激.

答案是 here.

运行此命令以手动启动服务器:

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读