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:
- Encrypt the root password with
encrypt.cmd.
- Open the command prompt and navigate to the directory
Server\install\toolbox\bin
. - Run the following command:
encrypt.cmd <password>
- Open the command prompt and navigate to the directory
- Copy the encrypted password.
- 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>
- Save the
agiliance.properties
file. - Restart the RiskVision Tomcat.
To change the MySQL agiliance application passwords:
MySQL Database:
- Navigate to and
%AGILIANCE_HOME%\MySQL\bin
open the command prompt from that window. - In command prompt manually enter the command:
mysql -uroot -p default_password -Dmysql.
- Change the agiliance password using the following command:
SET PASSWORD FOR 'agiliance'@'localhost'= PASSWORD ('newpass');
FLUSH PRIVILEGES;
- Try logging in from MySQL with agiliance and new password.
- 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:
- Encrypt the agiliance password with encrypt.cmd
- Open the command prompt and navigate to the Server\install\toolbox\bin directory.
- Run the following command:
encrypt.cmd <password>
- Copy the encrypted password
- 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>
- Save the
agiliance.properties file.
- Restart the RiskVision Tomcat.