一款开源的MySQL数据库InnoDB数据恢复工具:innodb-tools,它通过从原始数据文件中提取表的行记录,实现从丢失的或者被毁坏的MySQL表中恢复数据。例如,当你不小心执行DROP TABLE、TRUNCATE TABLE或者DROP DATABASE之后,可以通过以下方式恢复数据。
下载工具包;wget https://launchpad.net/percona-data-recovery-tool-for-innodb/trunk/release-0.5/+download/percona-data-recovery-tool-for-innodb-0.5.tar.gz
解压工具包:tar -zxvf percona-data-recovery-tool-for-innodb-0.5.tar.gz
check文件:进入香港的mysql-source进行./configure检查相关的包和文件是否完整;
config.status: creating mtr/Makefile
config.status: creating page/Makefile
config.status: creating pars/Makefile
config.status: creating que/Makefile
config.status: creating read/Makefile
config.status: creating rem/Makefile
config.status: creating row/Makefile
config.status: creating srv/Makefile
config.status: creating sync/Makefile
config.status: creating thr/Makefile
config.status: creating trx/Makefile
config.status: creating usr/Makefile
config.status: creating ib_config.h
config.status: executing depfiles commands
MySQL has a Web site at http://www.mysql.com/ which carries details on the
latest release, upcoming features, and other information to make your
work or play with MySQL more productive. There you can also find
information about mailing lists for MySQL discussion.
Remember to check the platform specific part of the reference manual for
hints about installing MySQL on your platform. Also have a look at the
files in the Docs directory.
Thank you for choosing MySQL!
[root@slave01 mysql-source]#
[root@slave01 mysql-source]# ls
aclocal.m4 configure libmysqld mysys stamp-h1
bdb configure.in libmysql_r ndb strings
BUILD dbug libtool netware support-files
client debian ltmain.sh os2 tests
cmd-line-utils depcomp Makefile pstack tools
config Docs Makefile.am regex vio
config.guess extra Makefile.in scripts win
config.h heap man server-tools zlib
config.h.in include missing sql
config.log innobase myisam sql-bench
config.status install-sh myisammrg sql-common
config.sub libmysql mysql-test SSL
[root@slave01 mysql-source]# cd ..
[root@slave01 percona-data-recovery-tool-for-innodb-0.5]# make
mkdir lib
cd mysql-source/include && make my_config.h
make[1]: Entering directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/include'
make[2]: Entering directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source'
make[2]: Leaving directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source'
/bin/cp ../config.h my_config.h
make[1]: Leaving directory `/usr/local/percona-data-recovery-tool-for-innodb-0.5/mysql-source/include'
gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I mysql-source/include -I mysql-source/innobase/include -c tables_dict.c -o lib/tables_dict.o
gcc -DHAVE_OFFSET64_T -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -Wall -O3 -g -I include -I m