Search Postgresql Archives

Re: Why password authentication failed for user "postgres"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2022-06-04 00:32, BeginnerC wrote:
Hello everyone,
I am a newbie to the postgres,when I use the psql to connect to the postgres,a error message printed:
These command list like this:

psql -U postgres
Password for user postgres:postgres
postgreSQL: password authentication failed for user "postgres"

How to solve this problem?
Thanks in advance!

If you use -U with psql, the connection must not try to use method "peer" (which means "use the system user with this name", but also means "You must be logged in with the system user corresponding to the postgresql user"), but some kind of authorization, like md5, and use it with IP address. This might be difficult for the user postgres, who often has no password set in the database. If you really need to connect with user postgres and some password, you can set one using the method described by Reid Thompson.

Regards,

Frank


Attachment: OpenPGP_0xE5418B2366C33EE6.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux