Postgresql Windows,是否有默认密码?

时间:2013-09-09 13:04:26

标签: windows postgresql

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

2 个答案:

答案 0 :(得分:11)

试试这个:

Open PgAdmin -> Files -> Open pgpass.conf

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

Reference

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

 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

答案 1 :(得分:-6)

在linux上,默认用户是postgres。它具有超级用户权限,可以创建其他帐户,设置密码等。你能试试吗?