How do I set a password for my OpManager pgsql database ?

How do I set a password for my OpManager pgsql database ?

1) Start OpManager service


2)Connect  to OpManager database :

  a)Go to OpManager\pgsql\bin folder
  b)Type psql -U postgres -h 127.0.0.1 -p13306  OpManagerDB
  c)Once connected to the Database, execute the below query to set password
   
     ALTER USER Postgres WITH PASSWORD 'mike';
     (Replace your password with mike)


3)Shut down OpManager service


4)Edit the file databaseparams.conf  using wordpad and make the following changes :

From


# login password for the database if any
# password postgres AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB

to

# login password for the database if any
password mike AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB

(Remove the comment before the password and change the password from postgres to mike)


5)Edit the file "pg_hba" under Opmanager\pgsql\data using wordpad and modify the following, save the file

From

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust


# IPv6 local connections:
#host    all             all             ::1/128                trust

to

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5


# IPv6 local connections:
#host    all             all             ::1/128                 md5

( replace from trust to md5 )


6)Restart OpManager service , now you should be able to use password while connecting to OpManagerDB.


Applicable for OpManager version 11xxx installed on Windows box.

          • Related Articles

          • Reindex & Vacuum OpManager Database

            Reindex & Vacuum OpManager Database Stop OpManager service Make sure there is no running postgres process running in the Task Manger Open a command prompt as an administrator and go to /OpManager/bin directory Execute startPgsql.bat to start PGSQL ...
          • Steps for setting up a password for PgSQL DB

            The steps are verified and tested until 12.4.072.  We request you to take a VM snapshot or a folder backup of the OpManager server itself (stop the OpManager service) as a first measure. Below mentioned steps are applicable for Postgres version till ...
          • Database Migration - MySQL to PgSQL

            The DB migration from MySQL to PgSQL involves taking a PgSQL compatible backup, re-installing the product with PgSQL database and restoring the backup. The procedure for the above is a little tedious and time consuming in version 9 & 10. So, please ...
          • Unable to start OpManager - PGSQL

            Sometimes OpManager will not start when the server ran out of disk space in the pg_xlog directory. It will not be possible to retrieve the connection to OpManager database. The files present under OpManager\pgsql\data\pg_xlog get disappeared in such ...
          • OpManager DB migration from PGSQL to MSSQL in Version 125230

            For OpManager version 125230: PGSQL to MSSQL Migration Steps : In the PGSQL setup, go to OpManager home → bin, start Command Prompt with administrator privilege from this path and run DBConfiguration.bat. In the popup shown, please chose MSSQL, check ...