search cancel

Layer7 API Gateway: mysql_upgrade message

book

Article ID: 187683

calendar_today

Updated On:

Products

CA API Gateway API SECURITY STARTER PACK-7

Issue/Introduction

We are getting the mysql_upgrade message on our Production server. This is causing the mysqld.log to fill up quickly and the /var/log partition is using 92% of its space. Why are we getting message? 

2020-03-17T17:46:39.022078Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

2020-03-17T17:46:39.022102Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

2020-03-17T17:46:39.022167Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

2020-03-17T17:46:39.022193Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

Also, how can we clean up the  mysqld.log to make space in the /var/log partition?

Cause

mysql_upgrade examines all tables in all databases for incompatibilities with the current version of MySQL Server. mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added.

Environment

API Gateway: 9.3

Resolution

Please do the following (this will require downtime):

{SINGLE NODE}
1. Stop the ssg service
2. Take a backup of your mysql DB
3. Run command: mysql_upgrade --force
4. Restart the mysql service
5. Start the ssg service
 
{CLUSTERED NODES}
1. Stop the slave on the primary and secondary node
2. Stop the ssg service [PRIMARY]
3. Take a backup of your mysql DB [PRIMARY]
4. Run command: mysql_upgrade --force [PRIMARY]
5. Restart the mysql service [PRIMARY]
6. Start the ssg service [PRIMARY]
7. Stop the ssg service [SECONDARY]
8. Take a backup of your mysql DB [SECONDARY]
9. Run command: mysql_upgrade --force [SECONDARY]
10. Restart the mysql service [SECONDARY]
11. Start the ssg service [SECONDARY]
12. Run the create_slave.sh script on the primary and secondary node (if needed)


NOTE: Any error displayed during the run of mysql_upgrade can be ignored, if the last message is "Upgrade process completed successfully"

Additional Information

You can empty the mysqld.log with the following command: cat /dev/null > mysqld.log