A
Aryan Sharma

Posted on 26th April 2024|36 views

0
votes

Change Postgres Password Windows

How to change PostgreSQL user password windows?

Answers
P
veerubhotla sowmithri

Posted on 26th April 2024

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.

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos