LoginSignup
0
0

More than 1 year has passed since last update.

XAMPPのMariaDBでエラー「InnoDB: Table `mysql`.`innodb_table_stats` not found.」を見つけたので修正した

Last updated at Posted at 2021-07-28

概要

"XAMPP 8.0.7"の"MariaDB 10.4.19"にて次のエラーログを見つけた。MySQL5.6のバグのよう。

[ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.

修正方法

1.rootでログインしてdrop tableをする

# mysql -h127.0.0.1 -uroot -pパスワード
mysql > use mysql;
mysql > drop table innodb_index_stats;
mysql > drop table innodb_table_stats;
mysql > drop table slave_master_info;
mysql > drop table slave_relay_log_info;
mysql > drop table slave_worker_info;
mysql > quit;

2.MySQLを停止させる

xampp-controlからポチポチ

3.ファイルを削除する

# cd C:\xampp\mysql\data\mysql
# rm -rf innodb_index_stats*
# rm -rf innodb_table_stats*
# rm -rf slave_master_info*
# rm -rf slave_relay_log_info*
# rm -rf slave_worker_info*

4.MySQLを起動させる

xampp-controlからポチポチ

5.rootでログインしてテーブル作成

リンク先: https://bugs.mysql.com/file.php?id=19725&bug_id=67179&text=1

# mysql -h127.0.0.1 -uroot -pパスワード
mysql > use mysql;
mysql > リンク先のクエリを流す
mysql > quit;

6.mysql_upgradeをする

mysql_upgrade -u root -p
Enter password: ********

参考にしたサイト

Error: Table "mysql"."innodb_table_stats" not found.のバグに対応する
MariaDB:MariaDB のログに「 InnoDB: Error: Table “mysql”.”innodb_table_stats” not found. 」と出てた時の対処方法
Qiita: MariaDBとMySQL のバージョン比較

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0