QlikSense forgot postgres password
Bacckgroud
How can we do if we forgot the qlik pgsql password.
Reset the forgotten password
Add a new superuser
Connection information for reference:
Property | Value |
---|---|
Connection Name | PostgreSQL_localhost |
Host Name | localhost |
Port | 4432 |
Database Name | QSR |
Database User | qlikcheck |
Database Pass | xxxx |
Solution
-
goto machine , win menu ->
run notepad as admin
(or other tool depends on your machine) -
Goto pgsql/repository
config folder
C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6\
and editpg_hba.conf
file -
Set
host all all 127.0.0.1/32 md5
,md5
totrust
(so that can connect to pgsql without password) -
Goto pgsql
program folder
onD:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin
, shift+right click thenrun cmd here
-
input “
pgsql -h 127.0.0.1 -p 4432 -U postgres
” (if not set the md5 to trust , it will show the error and let u input the password. If u have password that can ignore this step)
Add New Superuser:
- input “
CREATE USER qlikcheck WITH PASSWORD 'xxxx'
” (create new user) - input “
grant postgres to qlikcheck
” (copy the postgres role to qlikcheck, postgres as superuser, so our new account also has superuser role)
Reset Password:
-
input “
ALTER USER postgres WITH PASSWORD 'new_password';
” to reset thepostgres
password -
Set back the trust to
md5
(forsecurity
) -
Goto Hub and create a new
connection
to verify it