1.1命令myisamchk(必须停掉mysql服务,或者所操作的表处于不活动状态)。(测试OK)
- [mysql@webdb01 ~]$myisamchk -r mytable.MYI
- myisamchk [OPTIONS] tables[.MYI]
- -o, --safe-recover Uses old recovery method; Slower than '-r' but can
handle a couple of cases where '-r' reports that it
can't fix the data file.
1.2命令mysqlcheck(mysql服务可以处于运行状态)。(没测试)
- [mysql@webdb01 ~]$mysqlcheck mydatabase mytable
- Usage:
- mysqlcheck [OPTIONS] database [tables]
-
OR mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
-
OR mysqlcheck [OPTIONS] --all-databases
2.修复表。(测试OK)
- mysql> REPAIR TABLE mytable;
1.1,2测试OK。
有待研究
阅读(832) | 评论(0) | 转发(0) |