</>code
- undef error - DBD::mysql::db selectrow_array failed: Table 'attach_data' is
- marked as crashed and should be repaired [for Statement "SELECT LENGTH(thedata)
- FROM attach_data WHERE id = ?"] at Bugzilla/Attachment.pm line 344
- Bugzilla::Attachment::datasize('Bugzilla::Attachment=HASH(0x9df119c)') called
</>code
- # myisamchk /var/lib/mysql/bugs/*.MYI >> /tmp/myisamchk_log.txtmyisamchk: error: Wrong bytesec: 0-0-0 at linkstart: 18361936
- MyISAM-table 'attach_data.MYI' is corrupted
- Fix it using switch "-r" or "-o"
- myisamchk: warning: 1 client is using or hasn't closed the table properly
- MyISAM-table 'groups.MYI' is usable but should be fixed
- myisamchk: warning: 1 client is using or hasn't closed the table properly
- MyISAM-table 'profiles.MYI' is usable but should be fixed
</>code
- Checking MyISAM file: user_group_map.MYI
- Data records: 182 Deleted blocks: 0
- - check file-size
- - check record delete-chain
- - check key delete-chain
- - check index reference
- - check data record references index: 1
</>code
- # myisamchk -r profiles.MYI- recovering (with sort) MyISAM-table 'profiles.MYI'
- Data records: 80
- - Fixing index 1
- - Fixing index 2
</>code
- # myisamchk --silent --force --fast --update-state /var/lib/mysql/bugs/*.MYImyisamchk: MyISAM file /var/lib/mysql/bugs/groups.MYI
- myisamchk: warning: 1 client is using or hasn't closed the table properly
- myisamchk: MyISAM file /var/lib/mysql/bugs/profiles.MYI
- myisamchk: warning: 1 client is using or hasn't closed the table properly
-s, - -你可以用两个 - s 使 myisamchk 非常沉默。
-f, - 强制选项 : 重新启动 myisamchk 自动与修复选项 -r, 如果表中有任何错误.
-F,--快速选项:仅检查尚未正确关闭的表。
-U --更新状态选项:当表发现任何错误时,将表标记为崩溃。
</>code
- # myisamchk --silent --force --fast --update-state \
- --key_buffer_size=512M --sort_buffer_size=512M \
- --read_buffer_size=4M --write_buffer_size=4M \
- /var/lib/mysql/bugs/*.MYI
</>code
- # myisamchk -dvv profiles.MYIMyISAM file: profiles.MYI
- Record format: Packed
- Character set: latin1_swedish_ci (8)
- File-version: 1
- Creation time: 2007-08-16 18:46:59
- Status: open,changed,analyzed,optimized keys,sorted index pages
- Auto increment key: 1 Last value: 88
- Data records: 88 Deleted blocks: 0
- Datafile parts: 118 Deleted data: 0
- Datafile pointer (bytes): 4 Keyfile pointer (bytes): 4
- Datafile length: 6292 Keyfile length: 6144
- Max datafile length: 4294967294 Max keyfile length: 4398046510079
- Recordlength: 2124
- table description:
- Key Start Len Index Type Rec/key Root Blocksize
- 1 2 3 unique int24 1 1024 1024
- 2 5 765 unique char packed stripped 1 2048 4096
- Field Start Length Nullpos Nullbit Type
- 1 1 1
- 2 2 3 no zeros
- 3 5 765 no endspace
</>code
- # myisamchk --help
- s, -仅打印错误。一个人可以使用两个 - s 使 myisamchk 非常沉默。
- v, -打印更多信息。这可用于 -描述和 --检查。使用许多 -v 来更详细。
-V, - 版本打印版本并退出。
- 哇, 等一下如果表已锁定,请等待。
- c, - - 检查检查表有错误。
-e, - - -检查表非常通。只有在极端情况下才使用,因为 myisamchk 通常能够找出表是否正常,即使没有此开关。
-F, - - 快仅检查尚未正确关闭的表。
-C, - - 只检查更改仅检查自上次检查以来已更改的表。
- f, - -如果表中有任何错误,请使用"-r"重新启动。状态将更新为"-更新状态"。
-i, - - 信息打印有关已检查表的统计信息。
-m, - - -比扩展检查更快,但只发现 99.99% 的所有错误。在大多数情况下应该足够好。
-U - 更新状态如果发现任何错误,将表标记为已崩溃。
-T, - - 只读不要将表标记为已选中。
-B, - 备份备份 。MYD 文件作为"文件名时间"。巴克。
-- 更正校验和更正表的校验和信息。
-e, - - -尝试从数据文件中恢复每一个可能的行。通常,这也会发现很多垃圾行;不要使用这个选项,如果你不是完全绝望。
- f, - -覆盖旧的临时文件。
-r, - - 恢复可以修复除不是唯一键之外的几乎任何内容。
-n, - 排序恢复强制恢复与排序,即使临时文件将是非常大。
-p, - - 并行恢复使用与"-r"和"-n"相同的技术,但在不同的线程中并行创建所有键。
-o, - - -使用旧的恢复方法;比 "-r" 慢,但可以处理几个情况下,"-r"报告无法修复数据文件。
- q, - - 快通过不修改数据文件加快修复速度。可以给出第二个"-q"来强制 myisamchk 在重复密钥的情况下修改原始数据文件。注:无法使用此选项修复数据文件损坏的表。
- u, - - -拆包文件包装与 myisampack 。
-a, - -分析键的分布。将更快地加入 MySQL。您可以使用"-描述-详细"来检查计算table_name。
- d, - - 描述打印一些有关表的信息。
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛