Administering the database


This topic provides the procedure for changing the MySQL root password and links to database administration information on the MySQL website:

To change the MySQL root password

  1. On the command line, enter the following command:
    • (Windows) change-db-root-password.bat
    • (Linux) change-db-root-password.sh
  2. At the Enter password prompt, enter the default password, admysql.
  3. At the New password prompt, enter a new password, using a strong password that comprises:
    • A minimum of 10 characters
    • Two of the following nonalphabetic characters that are noncontiguous:
      0 1 2 3 4 5 6 7 8 9 ~ ! @ # $ % ^ & * ( ) _ + - =
  4. At Confirm password, enter the new password again. 

    Note

    Keep the new password in a safe place, and do not divulge it to anyone. You will use the new password when you need to do backup, restore, and other maintenance tasks on the database.

Tip

You can use this command at any time to change the MySQL root password. When prompted to enter the password, enter the current password.

Recommendation for backing up the existing database

BMC recommends that you make a physical backup of the actual data files. The output of a physical backup contains data files that the mysqld server can use directly, resulting in a faster recovery operation.

For more information about making MySQL backup files, see Database Backup Methods.

Database data recovery

For information about how to recover the database data, see recovering a database.

Data retention configuration

Data retention is set during installation of the BMC Application Diagnostics Collector. You can change the data retention configuration anytime by changing the values of the following properties in the collector.properties file:

  • retention.time — The period of time, in days, to retain data in the database
  • db.max.size — The maximum size of the database in megabytes (MB). Default: 100000MB = 100GB

Database table optimization

To re-index database tables, use the optimize tables script. Due to the way in which BMC Application Diagnostics works with the database, you rarely need to run this script. You should run it only if performance degrades and analysis shows that the reason is fragmented indexes.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*