2010-07-26 32 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