Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
434 views
in Technique[技术] by (71.8m points)

postgresql - 如何更改PostgreSQL用户密码?(How to change PostgreSQL user password?)

如何更改PostgreSQL用户的密码?

  ask by Saad translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For password less login:

(对于少密码登录:)

sudo -u user_name psql db_name

To reset the password if you have forgotten:

(要忘记密码,请重设密码:)

ALTER USER user_name WITH PASSWORD 'new_password';

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...