Tuesday, December 03, 2013

How to change password in postgresql

For passwordless login, use this in terminal:
sudo -u <user_name> psql                           
it will ask for your system password then enter it:

then for reset password type it:
\password postgres
It will ask for new password. Enter it.

Then for quit it type:
\q
Reactions:

1 comment:

  1. If this doesn't work then, after getting enter into psql terminal window try following command

    $ ALTER USER postgres PASSWORD 'new_password';

    ReplyDelete