mysql crash recover

環境說明:mysql非正常關閉,致使mysql 啓動時提示以下信息:
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 3549062413
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 4069986716
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 426054.
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.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
120902 05:20:02 mysqld_safe Number of processes running now: 0
120902 05:20:02 mysqld_safe mysqld restarted
120902  5:20:02 [Warning] /usr/local/mysql5/libexec/mysqld: ignoring option '--character-set-client-handshake' due to invalid value 'latin1'
120902  5:20:02 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Log scan progressed past the checkpoint lsn 660 1753534775
120902  5:20:02  InnoDB: Database was not shut down normally!

錯誤日誌中一直提示這些信息

網上搜索該問題,緣由爲:
數據庫中表損壞致使數據訪問錯誤,從而致使數據庫崩潰;mysql中check table 發現表有損壞,但表是innodb類型不能修復
網上解決方法爲:在my.ini中mysqld下添加 innodb_force_recovery=4
說明:
1(SRV_FORCE_IGNORE_CORRUPT):忽略檢查到的corrupt頁。 2(SRV_FORCE_NO_BACKGROUND):阻止主線程的運行,如主線程須要執行full purge操做,會致使crash。 3(SRV_FORCE_NO_TRX_UNDO):不執行事務回滾操做。 4(SRV_FORCE_NO_IBUF_MERGE):不執行插入緩衝的合併操做。 5(SRV_FORCE_NO_UNDO_LOG_SCAN):不查看重作日誌,InnoDB存儲引擎會將未提交的事務視爲已提交。 6(SRV_FORCE_NO_LOG_REDO):不執行前滾的操做。
相關文章
相關標籤/搜索