How Do You Change the Password of the PostgreSQL Instance Account Named “Postgres”?

Problem scenario
You want to change the password at the SQL level -- not with the OS -- of the user named Postgres in your PostgreSQL install.  How do you change this password?

Solution
1.  Enter the SQL database to run a DDL command.
2.  Run this command to change the user named "postgres" to the password "abcd1234" with no quotes:

ALTER USER "postgres" WITH PASSWORD 'abcd1234';

Leave a comment

Your email address will not be published.