reset postgres password

# edit file pg_hba.conf
sudo nano /etc/postgresql/9.1/main/pg_hba.conf

# find this line in, if not find, add it
local   all             postgres                                peer
#save pg_hba.conf

# now login with pgsql super user
sudo -u postgres psql

# reset password user postgres
ALTER USER postgres PASSWORD 'newpassword';

# quit psql shell
\q

Published by

G3n1k

just to remember what i had known :)

One thought on “reset postgres password”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s