Bacckgroud
How can we do if we forgot the qlik pgsql password.
Reset the forgotten passwordAdd 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 folderC:\ProgramData\Qlik\Sense\Repository\PostgreSQL\9.6\and editpg_hba.conffile -
Set
host all all 127.0.0.1/32 md5,md5totrust(so that can connect to pgsql without password) -
Goto pgsql
program folderonD:\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 thepostgrespassword -
Set back the trust to
md5(forsecurity) -
Goto Hub and create a new
connectionto verify it