Upgrade failed installing 21.2.1 during mysql.cus stating mysql.servers doesn't exist
search cancel

Upgrade failed installing 21.2.1 during mysql.cus stating mysql.servers doesn't exist

book

Article ID: 221041

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

SPC-INT-20030: Installation failed
SPC-INT-20065: The installation of Spectrum is finished, but some errors occurred during the install.  Please see the installation log for details.

 

Output file shows

********** Started: Wed Aug  4 16:07:36 2021 **********
running Custom Script Install-Tools/CUS/mysql.cus
 ERROR 1146 (42S02) at line 7: Table 'mysql.servers' doesn't exist
newUser Failure: mysql --defaults-file=/spectrum/mysql/my-spectrum.cnf --login-path=myclient mysql
Error(s) occurred. Please see /spectrum/Install-Tools/LOGS/21.2.1.0.46_20210804/mysql.log.

Script Install-Tools/CUS/mysql.cus has FAILED
********** Completed: Wed Aug  4 16:08:20 2021 **********

 

 

 

 

Environment

Release : 21.2.xhttps://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/administrating/database-management/ddm-database-maintenance/database-restoration/ddm-load.html

 

Cause

MySQL default database 'mysql' innodb is corrupt and needs to be created

Resolution

The first step should be to create a backup (or have one available) of the Archive Manager DDMDB:

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/administrating/database-management/ddm-database-maintenance/database-backup/ddm-save.html

Once the save is complete:

1. Drop the mysql database

Login to MySQL: https://knowledge.broadcom.com/external/article/186583/how-to-connect-to-mysql-in-spectrum.html

Type:

drop database mysql;

You will get errors about tables not existing, proceed to next step.

2. Delete all files/folders under $SPECROOT/mysql/data

3. Run mysqld --initialize

    cd $SPECROOT/mysql/bin

    ./mysqld --defaults-file=../my-spectrum.cnf --initialize

Note: **A New root password provided in output, save this password. (Password written to the mysql servers log file)


Login to mysql as root with new password, change it back to "root"

     SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');

     FLUSH PRIVILEGES;


4. Recreate ddmdb database

At the mysql prompt type: create database ddmdb;


5. Recreate "spectrum" user and apply grants (superuser).

At mysql prompt:

    create user spectrum;

    GRANT ALL PRIVILEGES on *.* to 'spectrum'@'localhost' identified by 'spectrum';

    GRANT ALL PRIVILEGES on *.* to 'spectrum'@'%';

    FLUSH PRIVILEGES;

NOTE: The above values can be taken from $SPECROOT/SS/DDM/.configrc file (username and password - default is spectrum and spectrum)


6. Load saved DDMDB:

Confirm that the $SPECROOT/SS/DDM/.DDMDB.LOCK file is deleted first.

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/administrating/database-management/ddm-database-maintenance/database-restoration/ddm-load.html