【问题标题】:Postgres does not create rolePostgres 不创建角色
【发布时间】:2016-09-30 09:39:06
【问题描述】:

我已经通过 brew 安装了 postgres。但是,在运行rake db:create 之后,我得到了错误

角色“posgres”不存在

我无法运行psql,因为我的用户角色不存在,这是合乎逻辑的,但我也无法使用 -u postgres 登录。 有什么建议,如何创建 postgres 用户?

【问题讨论】:

标签: macos postgresql


【解决方案1】:

安装后服务似乎没有运行/打开。

文档参考: https://www.postgresql.org/docs/current/static/server-start.html

然后执行initdb /[数据位置]

然后您需要 sudo 到 postgres 用户(服务用户)向数据库发出命令。

【讨论】:

    猜你喜欢
    • 2015-12-01
    • 2013-03-13
    • 2015-08-16
    • 2017-10-09
    • 1970-01-01
    • 2021-10-11
    • 2013-05-11
    • 2021-05-22
    • 2020-03-04
    相关资源
    最近更新 更多