2010-07-26 115 views

回答

2

你不需要在默认情况下知道PostgreSQL的password.Because,PostgreSQL的信任本地操作系统users.So您可以登录PostgreSQL的没有密码:

psql -d db -U postgres 

那么你可以改变你的密码:

alter user postgres password 'password'; 
+0

此sudo -u postgres psql template1为我工作从https://help.ubuntu.com/10.04/serverguide/C/postgresql.html。您的命令给出:$ psql -d db -U postgres psql:FATAL:用户“postgres”的标识认证失败 – umpirsky 2011-05-16 13:59:47