【发布时间】:2016-09-30 09:39:06
【问题描述】:
我已经通过 brew 安装了 postgres。但是,在运行rake db:create 之后,我得到了错误
角色“posgres”不存在
我无法运行psql,因为我的用户角色不存在,这是合乎逻辑的,但我也无法使用 -u postgres 登录。
有什么建议,如何创建 postgres 用户?
【问题讨论】:
-
你好像有错字!
标签: macos postgresql
我已经通过 brew 安装了 postgres。但是,在运行rake db:create 之后,我得到了错误
角色“posgres”不存在
我无法运行psql,因为我的用户角色不存在,这是合乎逻辑的,但我也无法使用 -u postgres 登录。
有什么建议,如何创建 postgres 用户?
【问题讨论】:
标签: macos postgresql
安装后服务似乎没有运行/打开。
文档参考: https://www.postgresql.org/docs/current/static/server-start.html
然后执行initdb /[数据位置]
然后您需要 sudo 到 postgres 用户(服务用户)向数据库发出命令。
【讨论】: