Spectrum DDM db backups fail because mysql is running as root
search cancel

Spectrum DDM db backups fail because mysql is running as root

book

Article ID: 379506

calendar_today

Updated On:

Products

DX NetOps CA Spectrum

Issue/Introduction

After an install, the mysql process is running as the root user when it should not be.  When trying to save the database using the ddm_save.pl script, it errors:

Cannot create redo log files because data files are corrupt or the database was not shut down cleanly after ceating the data files.

Failed to initialize DD Storage Engine

Cause

The spectrum mysqld process is running as root user.  This can happen when there is a db issue that is not critical. 

The MYSQL.OUT may show:


2024-07-26T16:35:57.036835Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.33-commercial).
2024-07-26T16:35:57.802593Z 1 [ERROR] [MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11

Resolution

Chown all files in the $SPECROOT/mysql/bin/data/ddmdb directory to be owned by the spectrum install owner.

Stop mysql from $SPECROOT/mysql/bin:

./mysqladmin --defaults-file=../my-spectrum.cnf -uroot -p shutdown

Provide the mysql password.

Start mysqld back up as the spectrum install owner from the $SPECROOT/bin directory:

./launchinstdbapp hostname partname restart outfile

For example:

./launchinstdbapp localhost MYSQL y MYSQL.OUT

Run a process listing and verify mysqld is now running as the Spectrum install owner:

ps -ef | grep mysql