postgres + how to delete the password for hive metastore and set new password

410 Views Asked by At

we are working on HDP 2.6.5 cluster with ambari

we want to change the password for hive , since we think we enter previously wrong password

also from hive log we get:

Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "hive"

so we try

# su - postgres
Last login: Mon Aug 31 15:27:30 UTC 2020 on pts/2
-bash-4.2$ psql
psql (9.2.24)
Type "help" for help.

postgres=# CREATE DATABASE hive;
ERROR:  database "hive" already exists
postgres=# CREATE USER hive WITH PASSWORD 'something';
ERROR:  role "hive" already exists

but as we can see above we get - 'ERROR: role "hive" already exists"

how to delete the current password and set the new password?

reference - https://community.pivotal.io/s/article/How-to-find-the-Hive-metadata-store-password?language=en_US

1

There are 1 best solutions below

2
On BEST ANSWER

You don’t need to delete the old password and there isn’t really a way to delete it. Just use alter role command.

Alter role test with password ‘something’;