MariaDB で Aria recovery failed. エラーが出た時の対応記録
はじめに
先日「MariaDB 10.4 (XAMPP) で「Got error 176 "Read page with wrong checksum" from storage engine Aria」への対応記録」を投稿しましたが、今回はまた別なマシンで Maria DB のエラーが発生しました。
症状は前回と同様で、XAMPP コントロールパネルから Maria DB を起動すると直後に下記エラーが出て落ちます。
12:34:56 [mysql] Error: MySQL shutdown unexpectedly.
12:34:56 [mysql] This may be due to a blocked port, missing dependencies,
12:34:56 [mysql] improper privileges, a crash, or a shutdown by another method.
12:34:56 [mysql] Press the Logs button to view error logs and check
12:34:56 [mysql] the Windows Event Viewer for more clues
12:34:56 [mysql] If you need more help, copy and post this
12:34:56 [mysql] entire log window on the forums
mysql_error.log を確認したところ、今回は下記エラーメッセージが残っていました。
C:\xampp\mysql\data\mysql_error.log
2020-03-12 12:34:56 0 [ERROR] mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
2020-03-12 12:34:56 0 [ERROR] Plugin 'Aria' init function returned error.
2020-03-12 12:34:56 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
...
2020-03-12 12:34:56 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2020-03-12 12:34:56 0 [ERROR] Failed to initialize plugins.
2020-03-12 12:34:56 0 [ERROR] Aborting
今日はその解決のためにとして行ったことをご紹介します。
今回の手順が正しい方法だとは思っていません。またすべて解決しているのかも分かっていません。
検索しても資料が少なかったので、一例として残しています。
検索しても資料が少なかったので、一例として残しています。
- Maria DB
- 10.4.8
- XAMPP
- 7.3.11
対応記録
エラーメッセージに従って、まず下記コマンドを実行しました。
> cd c:\xampp\mysql\bin
> aria_chk -r
実行結果を見ると、どうも動いていないような感じ。テーブル名を指定する必要があるみたいですね。
- REPAIR TABLE - MariaDB Knowledge Base
- https://mariadb.com/kb/en/repair-table/#description
どのテーブル指定したらいいか分からなかったので、ダメもとで次のステップを試そうと思い、下記2ファイルを削除したところ動くようになりました。
C:\xampp\mysql\data\aria_log.00000001
C:\xampp\mysql\data\aria_log_control
これで全て解決しているのか不安はあるのですが、今のところ問題なく動作しているようです。何か進展があれば、この記事に追記しようと思います。