美文网首页我-程序成长-解惑
mac下 postgre无法使用

mac下 postgre无法使用

作者: 就叫初九吧 | 来源:发表于2016-10-20 09:50 被阅读46次

mac下brew安装postgre

brew services list
显示,postgre正在运行,执行psql命令显示

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

解决方法:
使用 postgres -D /usr/local/var/postgres 显示postgresql无法启动的更多信息

如果是一个pid文件锁定postgre阻止其启动,删除该pid文件:

rm /usr/local/var/postgres/postmaster.pid

相关文章