Freewind @ Thoughtworks scala java javascript dart 工具 编程实践 月结 math python english [comments admin] [feed]

(2014-08-31) 在mac上连接postgresql出现”/tmp/.s.PGSQL.5432″错误,无法连接

广告: 云梯:翻墙vpn (省10元) 土行孙:科研用户翻墙http proxy (有优惠)

在mac上使用psql命令连接postgresql,出现以下错误:

$> psql
psql: could not connect to server: Too many levels of symbolic links
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432″?

反复搜索,卸载了又装,都解决不了问题,但是通过图形工具pgAdmin连接又一切正常。

最后找到了这个解决办法:

export PGHOST=localhost

就一切正常了。

可以把它加入到~/.bashrc

comments powered by Disqus