各种指南展示了如何使用 brew 在 mac 上安装/启动 postgres:
brew install postgresql
brew services start postgresql
Run Code Online (Sandbox Code Playgroud)
然而,通常的下一步,用空密码连接,失败了。
psql postgres
Password for user <>:
psql: fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)
2019年如何在mac上连接新创建的postgres 11数据库?
前期研究:
它看起来像默认密码用于为空。
小智 1
在 shell 中以 \xe2\x80\x9eroot\xe2\x80\x9c 身份登录计算机
\n更改为 \xe2\x80\x9epostgres\xe2\x80\x9c 用户:
\n$ su - postgres(不需要密码,因为您是root)
$ psql
| 归档时间: |
|
| 查看次数: |
1230 次 |
| 最近记录: |