超级难题!!!我用MySQL3.32.21b,其中有个表a要经常写数据进去,当数据到一定量,数据表就只能读不能写,怎么办啊?注:说数据到一定量损坏不太符合,数据表现在大概有4百多万条记录,每隔一段时间,就出现只能读不能写的问题,急死了,各位大侠救救我啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!

解决方案 »

  1.   

    我用myisamchk检测了一下数据表,发现居然有12个客户端正在使用或没有完全关闭,修复也修复不了,具体操作如下:(bdbm2004是表名)//--- 检测到如下结果 ---
    C:\mysql\bin>myisamchk c:\mysql\data\bkff\bdbm2004
    Checking MyISAM file: c:\mysql\data\bkff\bdbm2004
    Data records: 1175657   Deleted blocks:       0
    myisamchk: warning: 12 clients is using or hasn't closed the table properly
    - check file-size
    myisamchk: warning: Keyfile is almost full,   67075072 of   67075072 used
    - check key delete-chain
    - check record delete-chain
    - check index reference
    - check data record references index: 1
    myisamchk: error: Found key at page 18339840 that points to record outside datafile
    MyISAM-table 'c:\mysql\data\bkff\bdbm2004' is corrupted
    Fix it using switch "-r" or "-o"//--- 试图修复,但是居然不能创建临时文件,郁闷+不解 ---
    C:\mysql\bin>myisamchk -r c:\mysql\data\bkff\bdbm2004
    - recovering MyISAM-table 'c:\mysql\data\bkff\bdbm2004.myi'
    Data records: 1175657
    myisamchk: error: Can't create new tempfile: 'c:\mysql\data\bkff\bdbm2004.tmd'
    MyISAM-table 'c:\mysql\data\bkff\bdbm2004' is not fixed because of errors
    Try fixing it by using the --safe-recover (-o) option各位大侠一定要救救小弟啊~~~~~~!真是头疼的问题!