Change Database Account Passwords

This section explains how to lock down the database and change the default passwords in MySQL. You must change the corresponding settings in the application, as explained in the Configuring Database on the RiskVision Application section.

To change the MySQL root account passwords: 

1. Navigate to %AGILIANCE_HOME%\MySQL\bin and open Command Prompt from that window. 

2. Enter the command: 

mysql -uroot -p default_password –Dmysql.

3. Change the root password using the following command:

SET PASSWORD FOR 'root'@'localhost'= PASSWORD ('newpass');

FLUSH PRIVILEGES;

4. Try logging in from mysql with root and new password

5. Run grants:

1. grant all on *.* to 'root'@'<ip_address or hostname>' identified by 'NEW PASSWORD' with grant option;

2. flush privileges;

Special characters like " ' " and " / " cannot be used in the password.

To change the Oracle Schema Accounts:

Your Oracle database administrator must change the password for the Schema Owner and Schema User accounts by executing the ALTER USER commands. After the passwords are changed, you must replace the changed password in all database connection properties.

  • ALTER user <username> IDENTIFIED BY <new_password>

The Application server

This section describes the application properties for connecting to the MySQL or Oracle database.

To update the passwords used by the application:

  1. Encrypt the root password with encrypt.cmd.
    • Open the command prompt and navigate to the directoryServer\install\toolbox\bin.
    • Run the following command: encrypt.cmd <password>
  2. Copy the encrypted password.
  3. Open the %AGILIANCE_HOME%\config\agiliance.properties file and set the below properties:

    For a MySQL database:

    database.mysql.admin.username.encrypted=EncryptedString

    database.mysql.admin.password.encrypted=EncryptedString

    For an Oracle database:

    database.oracle.username.encrypted=<Schema Owner username encrypted>

    database.oracle.password.encrypted=<Schema Owner password encrypted>

  4. Save the agiliance.properties file. 
  5. Restart the RiskVision Tomcat. 

To change the MySQL agiliance application passwords:

MySQL Database: 

  1. Navigate to and%AGILIANCE_HOME%\MySQL\bin open the command prompt from that window.
  2. In command prompt manually enter the command: 

mysql -uroot -p default_password -Dmysql.

  1. Change the agiliance password using the following command:

SET PASSWORD FOR 'agiliance'@'localhost'= PASSWORD ('newpass');

FLUSH PRIVILEGES;

  1. Try logging in from MySQL with agiliance and new password. 
  2. Run grants:
    • grant all on *.* to 'agiliance'@'<ip_address or hostname>' identified by 'NEW PASSWORD' with grant option;
    • flush privileges;

Oracle Database: 

  • ALTER user <username> IDENTIFIED BY <new_password>

On the Application server:

  1. Encrypt the agiliance password with encrypt.cmd
    1. Open the command prompt and navigate to the Server\install\toolbox\bin directory.
    2. Run the following command: encrypt.cmd <password>
  2. Copy the encrypted password
  3. Open %AGILIANCE_HOME%\config\agiliance.properties file and set the below mentioned properties:

    For the MySQL database:

    database.mysql.username.encrypted=EncryptedString
    database.mysql.password.encrypted=EncryptedString
    For the ORACLE database:
    database.oracle.username.encrypted=<Schema Owner username encrypted>
    database.oracle.password.encrypted=<Schema Owner password encrypted>
  4. Save the agiliance.properties file.
  5. Restart the RiskVision Tomcat.