MariaDBが起動しない Table ‘/mysql/proxies_priv’ is marked as crashed (MariaDBでのエラー)
MariaDBを起動しようとして、エラーが出た。
Error: MySQL shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums
Windowsのイベントビューアを見た。
左側: Windowsログ — Application
そこにMariaDBのエラーが記録されている。
ログには以下の内容があった。
mysqld.exe: Table ‘.\mysql\proxies_priv’ is marked as crashed and last (automatic?) repair failed
そこで、C:\xampp\mysql\data\mysql を見ると、以下のファイルがあった。
proxies_priv.frm
proxies_priv.MAD
proxies_priv.MAI
で、どうするの?
Fix: MySQL table is marked as crashed and last repair failed
上記サイトを見てもよくわからなかった。
で、ええい、ままよ、と削除した(笑)
(実際は、切り取って別の場所に保管した)
すると、動いた。
proxies_priv.* は自動で生成されるのかと思ったが、生成されなかった。
いいのかなあ。
後日談 (2021.10.21追記)
別のPCの元気に動いているXAMPPの中のMySQLのディレクトリから 以下のファイルをコピーして貼り付けたら、うまく動いた。
C:\xampp\mysql\data\mysql\
proxies_priv.frm
proxies_priv.MAD
proxies_priv.MAI
これらのファイルは、あるユーザーが別のユーザーになるときに 必要なファイルだということである。
さらに後日談 (2021.10.23)
proxies_priv.* の3つのファイルが無い状態で MariaDB を動かし、その状態で proxies_priv.* の3つのファイルを C:\xampp\mysql\data\mysql に戻す。
その状態で phpMyAdmin を起動し、左側で mysqlデータベースを選択。
右側で proxies_priv テーブルを選択して、下の「チェックしたものを」で「テーブルを修復する」を選択する。
これで修復できたっぽい。
(参考) 【PHP】MYSQL データベースのエラー#1030を修復する方法
参考 (追記 2022/12/10)
MariaDBが起動しなくなった(Table ‘global_priv’ crashed)
カテゴリー: mariadb, memo
タグ: crash, mariadb, proxies_priv
カウント: 218