【发布时间】:2014-01-14 06:41:41
【问题描述】:
我有一个正在运行的 Postgres 服务器实例,我使用以下命令启动:
pg_ctl -D /usr/local/var/postgres/data -l /usr/local/var/postgres/data/server.log start
运行命令createdb test 两次提示我输入密码,然后我收到此错误:
createdb: could not connect to database template1: FATAL: password authentication failed for user "joey"
另外,当我尝试使用
停止服务器时pg_ctl -D /usr/local/var/postgres/data stop -m smart
我收到此错误消息:
pg_ctl: PID file "/usr/local/var/postgres/data/postmaster.pid" does not exist
Is server running?
有什么我遗漏或忘记初始化/安装的吗?我用these instructions安装。
我检查了this answer 和this answer,但两者都没有解决我的问题。
【问题讨论】:
-
您指定的日志文件(/usr/local/var/postgres/data/server.log)中是否有任何内容?您还可以看到正在运行的 postgresql 进程吗(即,如果您运行 ps -ef,您会看到 'postmaster')吗?
-
嘿 @harmic -- gist.github.com/joeyyang/bd63d8a6908020bf23fb 和 gist.github.com/joeyyang/8bf619ae6034d04eee0d 分别是 server.log 和 ps -ef 的结果。
标签: postgresql