Postgresql: password authentication failed for user “postgres”

前端 未结 19 1806
时光取名叫无心
时光取名叫无心 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:13

    The response of staff is correct, but if you want to further automate can do:

    $ sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"

    Done! You saved User = postgres and password = postgres.

    If you do not have a password for the User postgres ubuntu do:

    $ sudo passwd postgres

提交回复
热议问题