No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade
Knowledge Base

How to change the password of PostgresSQL database

Publication Date:  2014-09-16  |   Views:  122  |   Downloads:  0  |   Author:  m00225238  |   Document ID:  EKB1000051526

Contents

Issue Description

Can’t login PostgresSQL database, error message “password authentication failed”

Alarm Information

none

Handling Process

1. login the server with the user root
2. switch the user to postgres, the command is “su – postgres”
3. run the command “psql” to login the database with the DBA user
4. list all the role of database, the command is “SELECT rolname FROM pg_roles;”
5. change the password of db_user to db_user_pw_new, the command is “ALTER ROLE db_user WITH PASSWORD 'db_user_pw_new';”
6. login the postgres with the new password

Root Cause

The password is lost.

Solution

none

Suggestions

none