当前位置: 网站首页 > 数据恢复常见问题与解答 > 数据库常见故障 >

MySQL数据库下.frm .MYD .MYI损坏恢复操作

时间:2010-07-14 14:37  来源:唯实科技   点 击:
导读』:MySQL数据库恢复..
关键字:MySQL数据库恢复

MySQL数据目录不是太难理解的。每一个数据库对应一个子目录,每个子目录中包含了对应于这个数据库中的数据表的文件。每一个数据表对应三个文件,它们和表名相同,但是具有不同的扩展名。tblName.frm文件是表的定义,它保存了表中包含的数据列的内容和类型。tblName.MYD文件包含了表中的数据。tblName.MYI文件包含了表的索引(例如,它可能包含lookup表以帮助提高对表的主键列的查询)。要检查一个表的错误,只需要运行myisamchk(在MySQL的bin目录下)并提供文件的位置和表名,或者是表的索引文件名:

唯实数据恢复

 

pcrecovery.com

% myisamchk /usr/local/mysql/var/dbName/tblName % myisamchk /usr/local/mysql/var/dbName/tblName.MYI  

网站抄袭,全家死光光,来源:唯实数据恢复公司

上面的两个命令都可以执行对指定表的检查。要检查数据库中所有的表,可以使用通配符:

内容来自vsinfo

 

严禁抄袭

% myisamchk /usr/local/mysql/var/dbName*.MYI  唯实数据恢复公司 

如果不带任何选项,myisamchk将对表文件执行普通的检查。如果你对一个表有怀疑,但是普通的检查不能发现任何错误,你可以执行更彻底的检查(但是也更慢!),这需要使用--extend-check选项: 严禁抄袭

 

文章抄袭自唯实数据恢复公司

% myisamchk --extend-check /path/to/tblName  
唯实数据恢复

对错误的检查是没有破坏性的,这意味着你不必担心执行对你的数据文件的检查会使已经存在的问题变得更糟。另一方面,修复选项,虽然通常也是安全的,但是它对你的数据文件的更改是无法撤消的。因为这个原因,我们强烈推荐你试图修复一个被破坏的表文件时首先做个备份,并确保在制作这个备份之前你的MySQL服务是关闭的。

pcrecovery.com

我在win2003下通过命令提示符,输入: 文章抄袭的

注:此为记录我当时操作的全部过程 pcrecovery.com

 

内容来自vsinfo

D:\Documents and Settings\Administrator>c: C:\>cd mysql C:\mysql>cd data C:\mysql\data>cd hw_enterprice C:\mysql\data\hw_enterprice>myisamchk function_products.frm 'myisamchk' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 C:\mysql\data\hw_enterprice>cd\ C:\>cd mysql C:\mysql>cd bin 注:查看myisamchk的帮助信息 C:\mysql\bin>myisamchk myisamchk Ver 2.6 for Win95/Win98 at i32 By Monty, for your professional use This software comes with NO WARRANTY: see the PUBLIC for details. Description, check and repair of ISAM tables. Used without options all tables on the command will be checked for errors Usage: myisamchk [OPTIONS] tables[.MYI] Global options: -#, --debug=... Output debug log. Often this is 'd:t:o,filename' -?, --help Display this help and exit. -O, --set-variable var=option Change the value of a variable. Please note that this option is deprecated; you can set variables directly with '--variable-name=value'. -t, --tmpdir=path Path for temporary files -s, --silent Only print errors. One can use two -s to make myisamchk very silent -v, --verbose Print more information. This can be used with --description and --check. Use many -v for more verbosity! -V, --version Print version and exit. -w, --wait Wait if table is locked. Check options (check is the default action for myisamchk): -c, --check Check table for errors -e, --extend-check Check the table VERY throughly. Only use this in extreme cases as myisamchk should normally be able to find out if the table is ok even without this switch -F, --fast Check only tables that haven't been closed properly -C, --check-only-changed Check only tables that have changed since last check -f  --force                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            网站抄袭,全家死光光,来源:唯实数据恢复公司 
很强大!
(0)
0%
烂透了!
(0)
0%
编辑:DANNY

您可能感兴趣的文章
搜索您感兴趣的内容
    热门:
赞助商链接
热门技术文章
硬盘常见问题