/ docker

[Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgradeを何とかする

環境

mysqlのdockerコンテナ

現象

mysqlイメージをpullしてコンテナへ展開したらいつのまにか下記の警告がわらわら出るようになった

2018-08-28T23:11:54.474791Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.474878Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.474907Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.476194Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.476244Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.476378Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.476397Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.476493Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2018-08-28T23:11:54.476513Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

目的

邪魔だし気になるので正しく警告を消したい

解決策

言われるがまま、mysql_upgradeコマンドを叩けばよい

とりあえずコンテナ上で作業する

docker ps -a
docker exec -it ${MYSQL_CONTAINER_ID} /bin/bash
mysql_upgrade -p
zienchan

zienchan

ハードウェアからソフトウェアまで広範囲で何か作ってます

Read More
[Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgradeを何とかする
Share this