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