Postgresql Windows,是否有默认密码?

Joe*_*Joe 29 windows postgresql

刚刚在Windows 7上安装了Postgresql.我没有被要求在安装过程中设置密码.当我运行psql时,我被要求输入密码.用Google搜索,唯一可能的默认密码是"postgre".但那没用.还尝试了一个空密码和我的Windows密码.他们都没有工作.阅读一些高级的东西如何重置密码,但这不可能是正确的?我在这里错过了什么?我想输入什么密码?

her*_*arn 11

试试这个:

Open PgAdmin -> Files -> Open pgpass.conf
Run Code Online (Sandbox Code Playgroud)

你会得到pgpass.conf窗口底部的路径.转到该位置并打开此文件,您可以在那里找到您的密码.

参考

如果上述方法不起作用,您可以考虑尝试:

 1. edit pg_hba.conf to allow trust authorization temporarily
 2. Reload the config file (pg_ctl reload)
 3. Connect and issue ALTER ROLE / PASSWORD to set the new password
 4. edit pg_hba.conf again and restore the previous settings
 5. Reload the config file again
Run Code Online (Sandbox Code Playgroud)

  • 该文件为空.我应该手动输入吗? (6认同)
  • 对我来说,pgAdmin4 用户名:postgres 和密码:postgres 已经解决了。离开这里以防对其他人有帮助。 (4认同)