Changing MariaDB passwords

Use this procedure to change the passwords of the MariaDB databases for event and model data.
To perform this procedure, the mariadb-events and mariadb-model child services of Resource Manager must be running.
  1. Log in to the Control Center master host as root, or as a user with superuser privileges.
  2. Change the passwords of the events database server.
    1. Log in to the Docker container of the mariadb-events service as zenoss.
      serviced service attach mariadb-events su - zenoss
    2. Start an interactive session.
      export TERM=dumb; mysql -u root
    3. Access the administration database.
      USE mysql
    4. Set the password of the root user.
      Replace New-Password with a new password:
      SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('New-Password');
      SET PASSWORD FOR 'root'@'localhost' = PASSWORD('New-Password');
      Record the password for use in a subsequent step.
    5. Update the password of the zenoss user.
      Replace New-Password with a new password:
      SET PASSWORD FOR 'zenoss'@'127.0.0.1' = PASSWORD('New-Password');
      SET PASSWORD FOR 'zenoss'@'%' = PASSWORD('New-Password');
      Record the password for use in a subsequent step.
    6. Exit the interactive session.
      QUIT
      The MariaDB server loads the grant tables into memory immediately when account management statements like SET PASSWORD are used, so the FLUSH PRIVILEGES statement is not necessary.
    7. Log out of the Docker container.
      exit
  3. Change the passwords of the model database server.
    1. Log in to the Docker container of the mariadb-model service as zenoss.
      serviced service attach mariadb-model su - zenoss
    2. Start an interactive session.
      export TERM=dumb; mysql -u root
    3. Access the administration database.
      USE mysql
    4. Set the password of the root user.
      Replace New-Password with a new password:
      SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('New-Password');
      SET PASSWORD FOR 'root'@'localhost' = PASSWORD('New-Password');
      Record the password for use in a subsequent step.
    5. Update the password of the zenoss user.
      Replace New-Password with a new password:
      SET PASSWORD FOR 'zenoss'@'127.0.0.1' = PASSWORD('New-Password');
      SET PASSWORD FOR 'zenoss'@'%' = PASSWORD('New-Password');
      Record the password for use in a subsequent step.
    6. Exit the interactive session.
      QUIT
    7. Log out of the Docker container.
      exit
  4. Log in to the Control Center browser interface.
  5. In the Applications table, click Zenoss.resmgr.
  6. In the application title line, click Edit Variables.
    Initially, the application title line appears immediately below the Control Center banner at the top of the page. When you scroll down the page, the application title line persists at the top of the page.
    Figure 1. Edit Variables dialog
  7. Update the passwords of the event database server.
    1. In the Edit Variables dialog, locate the global.conf.zep-password variable.
    2. Replace its value with the password specified previously for the zenoss user of the events database server.
    3. Locate the global.conf.zep-admin-password variable.
    4. Replace its value with the password specified previously for the root user of the events database server.
  8. Update the passwords of the model database server.
    1. Locate the global.conf.zodb-password variable.
    2. Replace its value with the password specified previously for the zenoss user of the model database server.
    3. Locate the global.conf.zodb-admin-password variable.
    4. Replace its value with the password specified previously for the root user of the model database server.
    5. At the bottom of the Edit Variables dialog, click Save Changes.
  9. In the application title line, click Restart.