The log for my MySQL service instance is full of warnings suggesting "mysql_upgrade" should be run
search cancel

The log for my MySQL service instance is full of warnings suggesting "mysql_upgrade" should be run

book

Article ID: 293269

calendar_today

Updated On:

Products

VMware Tanzu SQL

Issue/Introduction

The log for my MySQL service instance is full of warnings like the following suggesting "mysql_upgrade" should be run:

[Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade


Resolution

This may be related to an old MySQL bug where the database did not allocate enough characters for tracking index names, particularly if the environment is using a partitioned table with a long index name.

To resolve this and run "mysql_upgrade" as suggested in the log message:

 

On a single-node, leader, and non-"Super Read Only" follower VMs

sudo /var/vcap/packages/percona-server/bin/mysql_upgrade --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf

 

On a follower VM where the "inspect" errand indicates the follower has "Super Read Only: true"

$ sudo su -
# mysql --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf --execute="set global super_read_only=off"
# /var/vcap/packages/percona-server/bin/mysql_upgrade --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf
# monit restart mysql