psql: could not connect to server: No such file or directory

  今天,在使用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"?  

我第一反映是PG服务器没有运行,于是用命令 postmaster -D /usr/local/pgsql/data/ 来启动服务器,可是没有反映,不知道是不是因为在前台启动会产生死锁?我用在后台启动PG服务,命令:postmaster -D /usr/local/pgsql/data/ > logfile 2>&1 &  . 再用psql连接数据库就OK了.

你可能感兴趣的:(socket,server,File,服务器,domain,PostgreSQL)