Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2318252
  • 博文数量: 473
  • 博客积分: 12252
  • 博客等级: 上将
  • 技术积分: 4307
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-12 10:02
文章分类

全部博文(473)

文章存档

2012年(8)

2011年(63)

2010年(73)

2009年(231)

2008年(98)

分类: Mysql/postgreSQL

2010-12-15 13:41:41

First, .FRM files contain none of your "data". They are simply the definition of the table.

If all of the following are true:

  • The table is using the MyISAM storage engine
  • You know the CREATE TABLE statement required to recreate the table

Then, do the following:

  1. Stop MySQL
  2. Backup your table_name.frm, table_name.MYI, table_name.MYD files
  3. Delete them from your mysql data directory (/var/lib/mysql usually)
  4. Start MySQL
  5. CREATE the table again
  6. Stop MySQL
  7. Copy the .MYD and .MYI files back into the datadir, replacing the ones there.
  8. Start MySQL
  9. ???
  10. Profit
阅读(1857) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

wwmshe2012-09-19 15:56:04

What if there is no reference .MYD and .MYI files under the datadir?