createdb: could not connect to database postgres: could not connect to server: No such file or directory

createdb: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

mountain lion下brew install postgresql后,每次启动都报这个错。

解决办法:

which psql

然后回得到一个路径

export PATH=(刚才输出的那个路径):$PATH
posted @ 2012-11-19 12:41  Phenix.  阅读(895)  评论(0编辑  收藏  举报