How to Reset a PostgreSQL Password

PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. Here is an instruction to tell you how to reset PostgreSQL password to keep its security.

 

1. Click “Start” and type “cmd.exe” in the Search bar to open a new command terminal on the server running PostgreSQL.

1

2

2. Type “psql -h localhost” without quotes into the command window so that you could access the PostgreSQL database from the root account of the computer running the server.

3. Run the command “ALTER USER <name> WITH PASSWORD ‘password’;.” Replace name and password with the new one you want. Now you’ve successfully reset the PostgreSQL password.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *