Postgresql: password authentication failed for user “postgres”

前端 未结 19 1788
时光取名叫无心
时光取名叫无心 2020-11-22 13:34

I have installed PostgreSQL 8.4, Postgres client and Pgadmin 3. Authentication failed for user \"postgres\" for both console client and Pgadmin. I have typed user as \"postg

19条回答
  •  甜味超标
    2020-11-22 14:15

    This was frustrating, most of the above answers are correct but they fail to mention you have to restart the database service before the changes in the pg_hba.conf file will take affect.

    so if you make the changes as mentioned above:

    local all postgres ident
    

    then restart as root ( on centos its something like service service postgresql-9.2 restart ) now you should be able to access the db as the user postgres

    $psql
    psql (9.2.4)
    Type "help" for help.
    
    postgres=# 
    

    Hope this adds info for new postgres users

提交回复
热议问题