How to fix innodb_table_stats and innodb_index_stats has length mismatch

To fix annoying warnings like:

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

Just go ahead and run mysql_upgrade. But do backup of your data firstly!

mysql_upgrade should be executed each time you upgrade MySQL

mysql_upgrade examines all tables in all databases for incompatibilities with the current version of the MariaDB Server. 

mysql_upgrade also upgrades the system tables so that you can take advantage of new privileges or capabilities that might have been added.

To check and repair tables and to upgrade the system tables, mysql_upgrade executes the following commands:

mysqlcheck --all-databases --check-upgrade --auto-repair
mysql < fix_priv_tables
mysqlcheck --all-databases --check-upgrade --fix-db-names --fix-table-names

To execute just run:

mysql_upgrade

 

 

 

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *