当前位置:网站首页>PostgreSQL modifies the password of the database user

PostgreSQL modifies the password of the database user

2022-07-06 21:39:00 ac.char

pg_hba.conf, Authentication set to md5 Authentication connection appears :

postgresql FATAL: password authentication failed for user "postgres"

 Insert picture description here

edit pg_hba.conf, take md5 The certification is modified to trust authentication , Exit saving after editing

perform pg_ctl reload Loading takes effect

psql Connect , use alter role Change Password

Execute the following command

alter role postgres with password ' New password ';

View the current postgresql How many users , And the corresponding password

select rolname,rolpassword from pg_authid;

sign out psql

edit pg_hba.conf, take turst The certification is modified to md5 authentication , Exit saving after editing

perform pg_ctl reload Loading takes effect

原网站

版权声明
本文为[ac.char]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207061327018597.html