ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Mysql problem upgrading to 21.2.6/ 21.2.8 access denied for 'root'@'localhost'

book

Article ID: 238705

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

Upgrading from 21.2.4 to 21.2.6/21.2.8 the upgrade may fail with the following error:

Cause

The cause of failure could be a dis-alignment between the mysql root's password stored in myclient and the mysql root's password stored in mysql db.

This situation may occur if in 21.2.4 you tried to change the mysql root's password as documented at https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/administrating/database-management/configure-mysql-root-password.html 

 

but you did not complete the change of it updating it also in mysql.

 

Environment

Release : 21.2.4,21.2.6,21.2.8

Component :

Resolution

Before running the upgrade, if you have tried to change the mysql root's password, you can check if there is a dis-alignment as follow:

1) check the mysql root's password in Spectrum myclient  in the /my_print_defaults output
 
cd $SPECROOT/mysql/bin
export MYSQL_TEST_LOGIN_FILE=$SPECROOT/mysql/data/mylogin.cnf
./my_print_defaults -s --defaults-file=$SPECROOT/mysql/my-spectrum.cnf myclient
 
2) verify if you are able to manually login to mysql with the password returned by the ./my_print_defaults command
 
./mysql --defaults-file=$SPECROOT/mysql/my-spectrum.cnf -uroot -p<password>

 If you are able to login you can proceed with the upgrade otherwise you have to complete the change the mysql root's password (if it was interrupted) or change it back to the default value.

Attachments