How to change the MySql password in NetOps Performance Management
search cancel

How to change the MySql password in NetOps Performance Management

book

Article ID: 143312

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

How can I change the MySql password on NetOps Performance Management?

How can we change the current complex MySql Password in use by the NetOps Portal database?

 

Environment

All supported DX NetOps Performance Management releases

Cause

Admin user of tool left the company.
Company policy requires any passwords the user had access to be changed.

Resolution

There are 2 accounts used in the tool for MySql DB access. The root and netqos users. Their passwords must be the same.

To change the password take these steps. Default paths shown.

  1. Stop the four services:
    • systemctl stop caperfcenter_console
    • systemctl stop caperfcenter_devicemanager
    • systemctl stop caperfcenter_eventmanager
    • systemctl stop caperfcenter_sso
  2. Open a new MySql prompt. Enter the current password when prompted.
    • /opt/CA/MySql/bin/mysql -uroot -p
  3. Run the following commands. For each replace new-password with the new password.
    • alter user 'netqos'@'%' identified by 'new-password';
    • alter user 'netqos'@'localhost' identified by 'new-password';
    • alter user 'root'@'%' identified by 'new-password';
    • alter user 'root'@'localhost' identified by 'new-password';
  4. Run the following command to validate the users have the same password set. It should show the same encrypted string for all users.
    • select host,user,authentication_string from mysql.user;
  5. Generate a new encrypted password string.
    • Go to /opt/CA/PerformanceCenter/Tools/bin
    • Run:
      • ./doEncryption.sh new-password
    • Record the new encryption string for the next step.
  6. Update the db.password field in the following files:
    • /opt/CA/PerformanceCenter/DM/webapps/dm/WEB-INF/dm.properties
    • /opt/CA/PerformanceCenter/EM/webapps/EventManager/WEB-INF/em.properties
    • /opt/CA/PerformanceCenter/sso/webapps/sso/WEB-INF/sso.properties
  7. Update the dbPassword field in the following file:
        /opt/CA/PerformanceCenter/PC/webapps/pc/WEB-INF/cfg/portal.console.properties
  8. Start the four services:
    • systemctl start caperfcenter_sso
    • systemctl start caperfcenter_eventmanager
    • systemctl start caperfcenter_devicemanager
    • Wait 60 seconds.
    • systemctl start caperfcenter_console

Introduced in 21.2.8 are scripts that allow a customer to update the password if the original is known:

/opt/CA/MySql/scripts/reset_mysql_password.sh -p '<password>' -n '<newpassword>'

Then run to update properties files:

/opt/CA/PerformanceCenter/Tools/bin/reset_pc_db_password.sh -p '<new-password>'