【问题标题】:PostgreSQL on Mac doesn't recognize users passwordMac 上的 PostgreSQL 无法识别用户密码
【发布时间】:2019-11-09 01:15:36
【问题描述】:

我从其他帖子和 SO 问题中尝试了许多建议,但似乎没有一个能奏效。我刚刚使用 brew install 安装了 PostgreSQL,然后运行了 initdb 命令。输出表示用户将用于 DB,但是,用户始终显示为 mac 用户。我可能会错过什么?

控制台输出:

createdb: could not connect to database template1: FATAL: password authentication failed for user "macuser" 
Users-MBP:~ macuser$ 

【问题讨论】:

    标签: postgresql macos homebrew database-administration


    【解决方案1】:

    只需通过以下操作删除已安装的 postgresql。

    删除以前版本的 PostgreSQL brew卸载--force postgresql 删除所有 Postgres 文件 rm -rf /usr/local/var/postgres

    从 Postgresql 下载 macOS 包并安装。

    https://www.postgresql.org/download/macosx/

    默认用户是postgres,安装时需要输入密码

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-02
      • 2015-11-24
      • 1970-01-01
      • 1970-01-01
      • 2017-03-03
      • 1970-01-01
      • 2021-02-18
      • 1970-01-01
      相关资源
      最近更新 更多