当我使用命令启动 PostgreSQL 时:
$ sudo /etc/init.d/postgresql start
Pg 没有启动。报告的错误是:
* Starting PostgreSQL 8.4 database server
* The PostgreSQL server failed to start. Please check the log output:
2010-01-21 22:10:00 PST FATAL: private key file "server.key" has group or world access
2010-01-21 22:10:00 PST DETAIL: File must be owned by the database user or root, must have no write permission for "group", and must have no permissions for "other".
...当我尝试以用户身份访问psql
时postgres
:
$ sudo su postgres
$ psql
它给了我一个错误:
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?