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


Article ID: 221041


Updated On:


CA Spectrum DX NetOps


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/

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






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



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


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


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


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');


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'@'%';


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.