MySQL database version 5.5.2 for Linux can become corrupted


Note

2-5-01-Service-Pack-1 resolves this problem.

On Linux operating systems where the BMC Application Diagnostics Server version 2.5.00, or earlier, is installed, tables in the MySQL database can become corrupted and unreachable after partitioning operations. This problem is a known issue and reported as a bug in MySQL 5.5.2.

This issue was assigned the ID code AD-1017.

Recommended action

Upgrade to MySQL version 5.6.14 for BMC Application Diagnostics Server databases. Perform the following procedures on the database for each BMC Application Diagnostics Collectors.

Note

With MySQL 5.6.14, the BMC Application Diagnostics Server no longer supports SUSE Linux 10.4, as listed in the System-requirements. For information about MySQL support, see Supported Platforms: MySQL Database.

Before you begin

  • Download the upgrade file from the Electronic Product Distribution (EPD)  to a temporary directory on each BMC Application Diagnostics Server computer and extract the files.
     

    Click to expand steps.

    To download the MySQL upgrade files

    1. Log on to the EPD website.

    2. Under the Product Patches tab, expand the BMC Application Management Suite.
    3. Drill down to the appropriate version, platform, and language for BMC Application Diagnostics.
    4. Click BMC App Diagnostics Version 2.5.00 - MYSQL patch to download the MySQL-5.6.14.gz file.

    The upgrade package contains the following files:

    • upgradeManualADMySQL.sh. Shell script that performs the MySQL upgrade
    • mysql5.6.14.tar.gz. MySQL 5.6 database package
    • ADOP.cnf. MySQL configuration file
    • checkMySQLVersion.sh. Version verification script
    • readme.txt. Instructions file
  • Backup the database, as a precaution.
     

    Click to expand steps.

    To backup the MySQL database

    1. Log on to the BMC Application Diagnostics Server as a root user.
    2. Navigate to the <installationDirectory>/ADOP_DB/mysql-5.5.2-m2-linux-x86_64-glibc23/bin directory and run the mysqldump command.
      The default <installationDirectory> is /opt/bmc/BMC_Application_Diagnostics.

      ./mysqldump -u root -p<dbRootPassword> -S /tmp/mysqladop.sock --all-databases > /tmp/ad_db.sql
      • <dbRootPassword> is the password the system uses to access the database as a root user. The default password is admysql. If you changed the password after installation, use the current password. Enter the password without a space after the -p switch.
      • /tmp/ad_db.sql is the directory and file name of the backup. You can change these values, but ensure that you use an existing directory and the SQL file extension.
    3. Ensure that the backup file is created and, if necessary, remove the file from the temporary directory.

To check for corrupted tables in the database

Before you upgrade the database, you must determine if the database already contains corrupted tables.

Run the following command on the computer with the Collector:

./<installationDirectory>/ADOP_DB/mysql-5.5.2-m2-linux-x86_64-glibc23/bin/mysqlcheck adops_collector -u root -p<dbRootPassword> -S /tmp/mysqladop.sock
  • <installationDirectory> is the location of the BMC Application Diagnostics Server. The default installation directory is /opt/bmc/BMC_Application_Diagnostics.
  • <dbRootPassword> is the password the system uses to access the database as a root user. The default password is admysql. If you changed the password after installation, use the current password. Enter the password without a space after the -p switch.

If the results show error messages about missing tables, contact BMC Support.

If the results in the command window display that all the tables are OK, continue with the upgrade instructions as described below.

To upgrade the MySQL database

  1. Log on to the BMC Application Diagnostics Server component as a root user.  
  2. Navigate to the directory with the extracted files and run the following command:

    ./upgradeManualADMySQL.sh <installationDirectory>/ADOP_DB <databasePort> <dbRootPassword> <copy|move>
    • <installationDirectory> is the location of the BMC Application Diagnostics Server. The default installation directory is /opt/bmc/BMC_Application_Diagnostics.
    • <databasePort> is the database port number defined during installation. The default port number is 3301.
    • <dbRootPassword> is the password the system uses to access the database as a root user. The default password is admysql. If you changed the password after installation, use the current password.
    • Enter copy or move to determine whether to copy the data file from the previous database or move the data file. If you do not enter an option, the default operation is copy.
      • If you enter copy, the previous data file is not deleted and a copy is created in the new database.
        If you do not have enough space, a warning is displayed and the upgrade script is aborted.
      • If you enter move, the previous data file is deleted and moved to the new database.

After several minutes, the upgrade finishes and the command prompt shows confirmation that the Portal service, Collector service, or both have restarted.

A verification script runs automatically, and a table is displayed in the command window with the following information:

+---------------+----------------------------------------+
| Variable_name | Value                                  |
+---------------+----------------------------------------+
| version       | 5.6.14-enterprise-commercial-advanced  |
+---------------+----------------------------------------+

Ensure that the version value is 5.6.14-enterprise-commercial-advanced.

To verify the MySQL version

To ensure that the upgrade finished successfully, run the provided script, checkMySQLVersion.sh, with the following command:

./checkMySQLVersion.sh <dbRootPassword>

<dbRootPassword> is the password the system uses to access the database as a root user. The default password is admysql. If you changed the password after installation, use the current password.

A table is displayed in the command window with the following information:

+---------------+----------------------------------------+
| Variable_name | Value                                  |
+---------------+----------------------------------------+
| version       | 5.6.14-enterprise-commercial-advanced  |
+---------------+----------------------------------------+

Ensure that the version value is 5.6.14-enterprise-commercial-advanced.

 

 

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