Change the Controller Database Root User Password

Note: If the Enterprise Console has NOT discovered the Controller:
To change the Controller database root user password:
  1. Log in to the Controller host. From a command line, enter:
    cd <controller_home_dir>
  2. 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.
  3. To start the database in insecure mode, enter:
    bin/controller.{sh|bat} start-db insecure
    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 --skip-grant-tables option.
  4. To log in to the database, enter:
    bin/controller.{sh|bat} login-db insecure
  5. Use MySQL to run the following commands:

    1. To specify the Controller database, enter:
      use mysql;
    2. To reload the MySQL grant tables, enter:
      FLUSH PRIVILEGES;
    3. To determine your MySQL version, enter:
      select version();
    4. 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>';
    5. To reload the MySQL grant tables, enter:
      FLUSH PRIVILEGES;
    6. To exit MySQL, enter:
      quit
  6. To stop the database, enter:
    bin/controller.{sh|bat} stop-db
  7. 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> 
If the Enterprise Console has discovered the Controller:

To update the Controller database root password with the following steps:

  1. Log in to the Enterprise Console and select the desired platform.

  2. Select Configurations > Controller Settings > Database Configurations.
  3. Enter the new password in New password for Controller DB root user.
  4. Reenter the password in Confirm New password for Controller DB root user.
  5. Select Save.

The password change takes immediate effect.

Note: If you previously disabled auto-failover, you should now enable it.