我刚刚在 Windows 7 上安装了 PostgreSQL 9.6。在安装过程中,我必须为默认用户“postgres”选择一个密码。
安装后运行 pgAdmin4,我输入了“postgres”的密码,它按预期保存。
但是在命令行中,默认用户似乎不是“postgres”,而是我的 Windows 会话用户名,我没有 PostgreSQL 密码(我的 Windows 密码在那里不起作用)。我可以使用 登录psql -U postgres,但是如何将默认用户更改为 postgres?
psql -U postgres
windows-7 postgresql
postgresql ×1
windows-7 ×1