Posted on 28th April 2025|36 views
How to change PostgreSQL user password windows?
Posted on 28th April 2025| views
1. If you forget or want to reset the password, then you need to go to the file pg_hba.conf change the Host all XXX md5 to Host all XXX trust.
2. You need to restart the service from the control panel now,
3. To log in, you need to run this command to reset the password:
ALTER USER <user_name> WITH PASSWORD <'new_password'>
4. Then you have to change the setting back to pg_hba.conf
5. Now replace md5 line again with the trust then after restarting you can enter the new password.