InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 30506.
InnoDB: You may have to recover from a backup.
130509 20:33:48 InnoDB: Page dump in ascii and hex (16384 bytes):
##很多十六進(jìn)制的代碼
……
……
InnoDB: End of page dump
130509 20:37:34 InnoDB: Page checksum 1958578898, prior-to-4.0.14-form checksum 3765017239
InnoDB: stored checksum 3904709694, prior-to-4.0.14-form stored checksum 3765017239
InnoDB: Page lsn 5 614270220, low 4 bytes of lsn at page end 614270220
InnoDB: Page number (if stored to page already) 30506,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 19
InnoDB: Page may be an index page where index id is 54
InnoDB: (index "PRIMARY" of table "maitem"."email_status")
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 30506.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: A new raw disk partition was initialized or
InnoDB: innodb_force_recovery is on: we do not allow
InnoDB: database modifications by the user. Shut down
InnoDB: mysqld and edit my.cnf so that newraw is replaced
InnoDB: with raw, and innodb_force_... is removed.
130509 20:39:35 [Warning] Invalid (old?) table or database name '#sql2-19c4-5'
執(zhí)行check,repair table 都無效
alter table email_status engine =myisam; #也報錯了,因為模式是innodb_force_recovery =1。
ERROR 1025 (HY000): Error on rename of '...' to '....' (errno: -1)
建立一張表:
create table email_status_bak #和原表結(jié)構(gòu)一樣,只是把INNODB改成了MYISAM。
把數(shù)據(jù)導(dǎo)進(jìn)去
insert into email_status_bak select * from email_status;
刪除掉原表:
drop table email_status;
注釋掉innodb_force_recovery 之后,重啟。
重命名:
rename table edm_email_status_bak to email_status;
最后該回存儲引擎
alter table edm_email_status engine = innodb
總結(jié):
這里的一個重要知識點就是 對 innodb_force_recovery 參數(shù)的理解了,要是遇到數(shù)據(jù)損壞甚至是其他的損壞??赡苌厦娴姆椒ú恍辛耍枰獓L試另一個方法:insert into tb select * from ta limit X;甚至是dump出去,再load回來。