Change the Controller Database Root User Password
- Downtime is required to change the Controller database root user password. If you have installed a Controller HA pair, you must disable auto-failover to avoid an accidental failover while changing the password. For more details, see Automatic FailoverNo Content found for /db/organizations/splunk/repositories/appdonprem-26_6_0/AppDynamics/documents/content/on_premises/r_automatic_failover.dita.
- You need to change the password on both of the Controller HA pairs.
-
Log in to the Controller host. From a command line, enter:
cd <controller_home_dir>
-
To stop the App Server and the database, enter:
bin/controller.sh stop
Note: If you are using MS Windows, you must use the Windows services to stop the Controller. -
To start the database in insecure mode, enter:The insecure option starts the database without password requirements. Use this option only to reset the password for the database. The option is similar to starting MySQL with the
bin/controller.{sh|bat} start-db insecure--skip-grant-tablesoption. -
To log in to the database, enter:
bin/controller.{sh|bat} login-db insecure -
Use MySQL to run the following commands:
-
To specify the Controller database, enter:
use mysql;
-
To reload the MySQL grant tables, enter:
FLUSH PRIVILEGES;
-
To determine your MySQL version, enter:
select version();
-
Based on which MySQL version you are using:
- MySQL 5.5
-
update mysql.user set password=password('<new-password-here>') where user like 'root%'; - MySQL 5.7
-
update mysql.user set authentication_string=password('<new-password-here>') where user like 'root%'; - MySQL 8.0
-
flush privileges; alter user 'root'@'localhost' identified by '<new-password-here>'; alter user 'root'@'127.0.0.1' identified by '<new-password-here>'; alter user 'root'@'::1' identified by '<new-password-here>';
-
To reload the MySQL grant tables, enter:
FLUSH PRIVILEGES;
-
To exit MySQL, enter:
quit
-
-
To stop the database, enter:
bin/controller.{sh|bat} stop-db -
To start the App Server, enter:
bin/controller.sh start
Note: If you are using MS Windows, you must use the Windows services to start the Controller.Warning:In the case of a Controller HA pair, generate an obfuscated password file for the Controller Database root user using the below command on the primary Controller server. This command will generate the password file on both primary and secondary Controller servers.
controller-ha/set_mysql_password_file.sh -p <new-password-here> -s <secondary_controller_hostname>
To update the Controller database root password with the following steps:
-
Log in to the Enterprise Console and select the desired platform.
- Select Configurations > Controller Settings > Database Configurations.
- Enter the new password in New password for Controller DB root user.
- Reenter the password in Confirm New password for Controller DB root user.
- Select Save.
The password change takes immediate effect.