Mysql innodb 誤刪除數據庫是否可恢復

可以,但是完全恢復所有的表不一定可以

 

工具: innodb-recovery

Official Website: http://code.google.com/p/innodb-tools/

 

This set of tools could be used to check InnoDB tablespaces and to recover data from damaged tablespaces or from dropped/truncated InnoDB tables.

這個工具用來檢查InnoDB空間表和恢復由於drop 以及truncate引發的損壞空間表的數據庫門

 

 

此工具使用需要安裝Perl的一些插件,有:

DBI

Mysql::DBD

 

恢復前提,提了以上的插件外,如果在使用時有報少插件,則需要找到少的插件,再安裝

另外, 恢復數據的前提是,數據庫使用的是innodb引擎,當用'DROP DATABASE DBNAME'後,沒有再做其它操作,保證ibdata1文件的完整性及不被後續寫數據破壞

 

 

執行恢復的過程中,有一步是需要注意的,就是"Recovery steps: Preparing the code for recovery"

默認生成的表結構中的一些列屬性的格式是不精確的,你需要精確這些屬性,恢復的概率纔會提高

######################

Note that this is a translation of the table format into what InnoDB Tools use internally as a C program.

You may need to edit this file later on, to force some constraints on the recovered data.

#####################

 

 

當你按照 http://code.google.com/p/innodb-tools/wiki/InnodbRecoverySteps 裏的步驟操作完,並恢復數據後,

相信, 你以後再也不會範類似的錯誤了,因爲這個過程是蠻長的,當然,前提是你的數據表多以及數據量大。

 

 

發佈了36 篇原創文章 · 獲贊 1 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章