postgresql安裝好後用pgadmin連接出現如下的錯誤訊息:
Error connecting to the server:FATAL: password authentication failed for user "postgres"
錯誤原因是沒有設定postgres的密碼,檢查及設定如下:
[root@Vigor14 ~]# su -l postgres -bash-3.2$ psql psql (8.4.7) Type "help" for help. postgres=# select * from pg_shadow; usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valunti l | useconfig ----------+----------+-------------+----------+-----------+--------+-------- --+----------- postgres | 10 | t | t | t | | | (1 row) postgres=# alter user postgres with password 'postgres'; ALTER ROLE postgres=#
0 意見:
張貼留言