Answers for "psql forget password"

2

reset postgres password windows

Backup the pg_hba.conf file by copying it.
Edit the pg_dba.conf, change `METHOD` to 'trust'
Restart the PostgreSQL server.
psql -U postgres.
ALTER USER postgres WITH PASSWORD 'new_password';
Restore the pg_dba.conf file.
Restart the PostgreSQL server.
Posted by: Guest on February-23-2021
0

reset postgre password

$ sudo -u postgres psql

Then type

# ALTER USER my_user_name with password 'my_secure_password';
Posted by: Guest on February-28-2022
0

how to reset postgres password

sudo sed -ibak 's/^\([^#]*\)md5/\1trust/g' /opt/bitnami/postgresql/conf/pg_hba.conf
sudo -u postgres pg_ctl reload
Posted by: Guest on January-14-2021
0

reset postgresql password windows

pg_ctl -D "C:\Program Files\PostgreSQL\12\data" restart
Langage de code :  JavaScript  ( javascript )
Posted by: Guest on November-11-2021

Browse Popular Code Answers by Language