27 9月 2011 @ 9:37 PM 

この間久しぶりにCounterize IIの画面を開いた。
全然アクセス数とか気にしなくなっていたので気づくのが遅れたのだけども、いつからかわからないけどもずっとアクセスが0という扱いになっていた。
さすがにアクセス0ということはないので、おそらくデータベースに異常が発生しているんじゃないかと思った。
プラグインの異常ということも考えたけども、ぐぐってみても別にそういう話はヒットしなかったからだ。

で、テーブルの構造とかに間違いがないかを調べていたら、なにやら変なエラーが発生した。
ERROR 145 (HY000)
どういうエラーなのか調べてみたら、どうやらテーブルが破損しているということらしい。
MyISAMテーブルのチェックはmyisamchkでできる。
データベースのデータ格納ディレクトリで

myisamchk -e *.MYI

とかすればチェックできる。
でしらべてみると

Checking MyISAM file: wp_Counterize.MYI
Data records:  267703   Deleted blocks:       0
myisamchk: warning: 9 clients are using or haven't closed the table properly
- check file-size
myisamchk: warning: Size of datafile is: 12830392        Should be: 12830056
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
myisamchk: error: Found 267710 keys of 267703
- check records and index references
myisamchk: error: Record-count is not ok; is 267710       Should be: 267703
myisamchk: warning: Found     267710 parts                Should be: 267703 parts
MyISAM-table 'wp_Counterize.MYI' is corrupted
Fix it using switch "-r" or "-o"

とか出てきた。
そこで、

myisamchk -r wp_Counterize

としたところ、治った模様。

ところで、MySQLさんはテーブルに異常が発生していたら勝手に通知してくれたり修復してくれたりしないのだろうか。
まったくもって気づかなかった。
ログにこっそりはき出されていたりするのかな。
メール通知オプションとかほしいな。
あるのかもしれないけど調べる気もとりあえず今はないでござる。


Posted By: ゆ。
Last Edit: 27 9月 2011 @ 09:37 PM

EmailPermalink
Tags
Tags:
Categories: Linux, PC


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


 Last 50 Posts
 Back
Change Theme...
  • Users » 100
  • Posts/Pages » 314
  • Comments » 177
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight