用myisamchk修复数据表如现如下错误,请问如何解决:
- recovering (with keycache) MyISAM-table '/usr/local/mysql/var/ok_bluesky/ok_log_tab.MYI'
Data records: 16402
Found link that points at 3978981063873790520 (outside data file) at 5226724
Found link that points at 3978981063873790520 (outside data file) at 5227108
Found link that points at 3546635495418167864 (outside data file) at 5228700
Found link that points at 3977573684695269944 (outside data file) at 5232476
Found link that points at 3977573684695269944 (outside data file) at 5232732
Found block with too small length at 5232844; Skipped
Found link that points at 3978981059712844344 (outside data file) at 5450804
Found link that points at 7161906714800907315 (outside data file) at 5451532
Found link that points at 8371422502050623347 (outside data file) at 5451688
Found link that points at 7089072688788745517 (outside data file) at 5451744
Found link that points at 8371422502050623347 (outside data file) at 5452024
Found link that points at 3255307777713450285 (outside data file) at 5452076
Found link that points at 4136102395879501101 (outside data file) at 5452180
Found link that points at 3255307777713450285 (outside data file) at 5452192
Found link that points at 4049971247778783536 (outside data file) at 5452292
Found link that points at 3255307777713450285 (outside data file) at 5452328
Found link that points at 3978981059712844344 (outside data file) at 5452468
Found link that points at 3978981059712844344 (outside data file) at 5452648
Found link that points at 3978981059712844344 (outside data file) at 5453176
Found link that points at 3978981059712844344 (outside data file) at 5453356
Found block with too small length at 5653824; Skipped
myisamchk: error: Not enough memory for blob at 5656088 (need 1903522412)
MyISAM-table '/usr/local/mysql/var/ok_bluesky/ok_log_tab.MYI' is not fixed because of errors
Try fixing it by using the --safe-recover (-o), the --force (-f) option or by not using the --quick (-q) flag补充说明:
mysql版本是5.0.14 系统是linux.表是在系统断电的情况下出现的.
不知有没有人碰到这种问题,是如何解决的?

解决方案 »

  1.   

    内存不够,加大试下.
    如:shell> myisamchk --silent --force --fast --safe-recover \
              -O key_buffer=64M -O sort_buffer=64M \
              -O read_buffer=1M -O write_buffer=1M \
              /path/to/datadir/*/*.MYI
      

  2.   

    先repair table 修复一下这个表吧
      

  3.   

    myisamchk: error: Not enough memory for blob at 5656088 (need 1903522412)
    从这里就可以看出内存不够了。在my.cnf或者my.ini里面:
    将下面的值增大,试试看。
    [myisamchk]
    key_buffer_size = 256M
    sort_buffer_size = 256M
    read_buffer = 2M
    write_buffer = 2M