Chinaunix首页 | 论坛 | 博客
  • 博客访问: 164671
  • 博文数量: 34
  • 博客积分: 310
  • 博客等级: 二等列兵
  • 技术积分: 255
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-09 01:00
文章分类

全部博文(34)

文章存档

2012年(19)

2011年(15)

分类:

2011-12-09 01:02:49

原文地址:mysql表修复 作者:syxian

1.1命令myisamchk(必须停掉mysql服务,或者所操作的表处于不活动状态)。(测试OK)
  1. [mysql@webdb01 ~]$myisamchk -r mytable.MYI
  2. myisamchk [OPTIONS] tables[.MYI]
  3.   -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服务可以处于运行状态)。(没测试)
  1. [mysql@webdb01 ~]$mysqlcheck mydatabase mytable
  2. Usage:
  3. mysqlcheck [OPTIONS] database [tables]
  4. OR mysqlcheck [OPTIONS] --databases DB1 [DB2 DB3...]
  5. OR mysqlcheck [OPTIONS] --all-databases

2.修复表。(测试OK)
  1. mysql> REPAIR TABLE mytable;

1.1,2测试OK。


有待研究










阅读(799) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~