在前阵子有一个客户的Mysql数据库被恶意删除,通过一晚努力恢复回来了。这里介绍下mysql的特殊恢复工具 undrop for innodb。
官网:
http://twindb.com/undrop-tool-for-innodb/
首先这是一个开源的工具,在github上有更新,在官网上也有对各个场景的使用介绍,这里不做多的介绍,我这里列举一个问题就是sys_parse工具的编译,官网提供的方法以及read me里的方式在我的环境里是编译不过去的,客户的数据库版本是5.1的,所在的系统平台是Cent os,但是需要引起注意的undrop for innodb有建议使用的操作系统版本,我使用的是Centos 6.5,Mysql 5.7版。下面是这次的恢复过程,请注意我改变的编译语法。
CentOs 6.5 Mysql 5.7.23
./stream_parser -f /mysqldata/ibdata1
[root@localhost undrop-for-innodb-develop]# ./stream_parser -f /mysqldata/ibdata1
Opening file: /mysqldata/ibdata1
File information:
ID of device containing file: 64512
inode number: 652164
protection: 100755 (regular file)
number of hard links: 1
user ID of owner: 0
group ID of owner: 0
device ID (if special file): 0
blocksize for filesystem I/O: 4096
number of blocks allocated: 36912
time of last access: 1559729794 Wed Jun 5 18:16:34 2019
time of last modification: 1559281768 Fri May 31 13:49:28 2019
time of last status change: 1559729794 Wed Jun 5 18:16:34 2019
total size, in bytes: 18874368 (18.000 MiB)
Size to process: 18874368 (18.000 MiB)
All workers finished in 0 sec
[root@localhost FIL_PAGE_INDEX]# ls -al
total 1812
drwxr-xr-x 2 root root 4096 Jun 5 18:23 .
drwxr-xr-x 4 root root 4096 Jun 5 18:23 ..
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000001.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000002.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000003.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000004.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000005.page
-rw-r–r– 1 root root 16384 Jun 5 18:23 0000000000000006.page
-rw-r–r– 1 root root 16384 Jun 5 18:23 0000000000000011.page
-rw-r–r– 1 root root 16384 Jun 5 18:23 0000000000000012.page
-rw-r–r– 1 root root 16384 Jun 5 18:23 0000000000000013.page
-rw-r–r– 1 root root 16384 Jun 5 18:23 0000000000000014.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000043.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000044.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000045.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000046.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000047.page
-rw-r–r– 1 root root 262144 Jun 5 18:23 0000000000000048.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000049.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000050.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000051.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000052.page
-rw-r–r– 1 root root 147456 Jun 5 18:23 0000000000000053.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000054.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000055.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000056.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000057.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000058.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000059.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000060.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000061.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000062.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000063.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000064.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000065.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000066.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000067.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000068.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000069.page
-rw-r–r– 1 root root 81920 Jun 5 18:23 0000000000000070.page
-rw-r–r– 1 root root 32768 Jun 5 18:23 0000000000000071.page
-rw-r–r– 1 root root 49152 Jun 5 18:23 0000000000000072.page
-rw-r–r– 1 root root 16384 Jun 5 18:23 18446744069414584320.page
mkdir -p dumps/default
恢复sys_tables
[root@localhost undrop-for-innodb-develop]# ./c_parser -4Df ./pages-ibdata1/FIL_PAGE_INDEX/0000000000000001.page -t dictionary/SYS_TABLES.sql -o ./dumps/default/SYS_TABLES -l ./dumps/default/SYS_TABLES.sql
[root@localhost undrop-for-innodb-develop]# cd dumps
[root@localhost dumps]# ls default/
SYS_TABLES SYS_TABLES.sql
[root@localhost dumps]# ls
default
[root@localhost dumps]# cd default/
[root@localhost default]# ls
SYS_TABLES SYS_TABLES.sql
[root@localhost default]# cat SYS_TABLES
— Page id: 8, Format: REDUNDANT, Records list: Invalid, Expected records: (0 2)
000000007B04 1A000001F80DAA SYS_TABLES “car\_doc/t\_order” 43 16 1 0 0 “” 0
000000000638 36000001890480 SYS_TABLES “car\_doc/t\_auth\_config” 14 8 1 0 0 “” 0
000000007B0E 1F0000021E0610 SYS_TABLES “car\_doc/t\_car\_type” 33 18 1 0 0 “” 0
000000007B14 22000001FA0E47 SYS_TABLES “car\_doc/t\_role” 44 6 1 0 0 “” 0
000000007B06 1B0000025C0256 SYS_TABLES “car\_doc/t\_dict” 35 3 1 0 0 “” 0
00000000063C 380000018B0256 SYS_TABLES “car\_doc/t\_dict” 18 3 1 0 0 “” 0
000000007B12 21000002110484 SYS_TABLES “car\_doc/t\_user” 46 9 1 0 0 “” 0
00000000063E 390000018C028B SYS_TABLES “car\_doc/t\_log” 20 5 1 0 0 “” 0
000000007B10 200000021607A6 SYS_TABLES “car\_doc/t\_advert” 30 13 1 0 0 “” 0
000000007B1A 2500000212062C SYS_TABLES “car\_doc/t\_book\_type” 32 17 1 0 0 “” 0
000000007B02 190000020F0740 SYS_TABLES “car\_doc/t\_auth\_config” 31 8 1 0 0 “” 0
000000000636 3500000188028B SYS_TABLES “car\_doc/t\_meals” 24 5 1 0 0 “” 0
000000000640 3A0000018D03FE SYS_TABLES “car\_doc/t\_news” 25 12 1 0 0 “” 0
00000000063A 370000018A04D2 SYS_TABLES “car\_doc/t\_order” 26 16 1 0 0 “” 0
000000007B08 1C000002270633 SYS_TABLES “car\_doc/t\_log” 37 5 1 0 0 “” 0
000000007B16 23000001BF0406 SYS_TABLES “car\_doc/t\_count” 34 8 1 0 0 “” 0
000000007B0A 1D0000021006DE SYS_TABLES “car\_doc/t\_news” 42 12 1 0 0 “” 0
000000007B0C 1E000001F90C68 SYS_TABLES “car\_doc/t\_feedback” 36 4 1 0 0 “” 0
000000007B20 28000001C20977 SYS_TABLES “car\_doc/t\_manager” 38 9 1 0 0 “” 0
000000007B1C 26000001FB0A24 SYS_TABLES “car\_doc/t\_manager\_authbak” 39 7 1 0 0 “” 0
000000007B1E 27000001C105F9 SYS_TABLES “car\_doc/t\_manager\_role” 40 3 1 0 0 “” 0
000000007B00 180000022607CE SYS_TABLES “car\_doc/t\_meals” 41 5 1 0 0 “” 0
000000007B18 24000001C00479 SYS_TABLES “car\_doc/t\_role\_auth” 45 3 1 0 0 “” 0
000000007F01 02000001860817 SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING” 48 4 1 0 0 “” 0
000000007B29 30000001C406EA SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING@00231” 48 4 1 0 0 “” 0
000000007B2C 32000001FE0C34 SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING@00232” 47 4 1 0 0 “” 0
— Page id: 8, Found records: 26, Lost records: YES, Leaf page: YES
— Page id: 8, Format: REDUNDANT, Records list: Invalid, Expected records: (0 2)
000000007B04 1A000001F80DAA SYS_TABLES “car\_doc/t\_order” 43 16 1 0 0 “” 0
000000000638 36000001890480 SYS_TABLES “car\_doc/t\_auth\_config” 14 8 1 0 0 “” 0
000000007B0E 1F0000021E0610 SYS_TABLES “car\_doc/t\_car\_type” 33 18 1 0 0 “” 0
000000007B14 22000001FA0E47 SYS_TABLES “car\_doc/t\_role” 44 6 1 0 0 “” 0
000000007B06 1B0000025C0256 SYS_TABLES “car\_doc/t\_dict” 35 3 1 0 0 “” 0
00000000063C 380000018B0256 SYS_TABLES “car\_doc/t\_dict” 18 3 1 0 0 “” 0
000000007B12 21000002110484 SYS_TABLES “car\_doc/t\_user” 46 9 1 0 0 “” 0
00000000063E 390000018C028B SYS_TABLES “car\_doc/t\_log” 20 5 1 0 0 “” 0
000000007B10 200000021607A6 SYS_TABLES “car\_doc/t\_advert” 30 13 1 0 0 “” 0
000000007B1A 2500000212062C SYS_TABLES “car\_doc/t\_book\_type” 32 17 1 0 0 “” 0
000000007B02 190000020F0740 SYS_TABLES “car\_doc/t\_auth\_config” 31 8 1 0 0 “” 0
000000000636 3500000188028B SYS_TABLES “car\_doc/t\_meals” 24 5 1 0 0 “” 0
000000000640 3A0000018D03FE SYS_TABLES “car\_doc/t\_news” 25 12 1 0 0 “” 0
00000000063A 370000018A04D2 SYS_TABLES “car\_doc/t\_order” 26 16 1 0 0 “” 0
000000007B08 1C000002270633 SYS_TABLES “car\_doc/t\_log” 37 5 1 0 0 “” 0
000000007B16 23000001BF0406 SYS_TABLES “car\_doc/t\_count” 34 8 1 0 0 “” 0
000000007B0A 1D0000021006DE SYS_TABLES “car\_doc/t\_news” 42 12 1 0 0 “” 0
000000007B0C 1E000001F90C68 SYS_TABLES “car\_doc/t\_feedback” 36 4 1 0 0 “” 0
000000007B20 28000001C20977 SYS_TABLES “car\_doc/t\_manager” 38 9 1 0 0 “” 0
000000007B1C 26000001FB0A24 SYS_TABLES “car\_doc/t\_manager\_authbak” 39 7 1 0 0 “” 0
000000007B1E 27000001C105F9 SYS_TABLES “car\_doc/t\_manager\_role” 40 3 1 0 0 “” 0
000000007B00 180000022607CE SYS_TABLES “car\_doc/t\_meals” 41 5 1 0 0 “” 0
000000007B18 24000001C00479 SYS_TABLES “car\_doc/t\_role\_auth” 45 3 1 0 0 “” 0
000000007F01 02000001860817 SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING” 48 4 1 0 0 “” 0
000000007B29 30000001C406EA SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING@00231” 48 4 1 0 0 “” 0
000000007B2C 32000001FE0C34 SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING@00232” 47 4 1 0 0 “” 0
— Page id: 8, Found records: 26, Lost records: YES, Leaf page: YES
— Page id: 8, Format: REDUNDANT, Records list: Invalid, Expected records: (0 3)
000000007B04 1A000001F80DAA SYS_TABLES “car\_doc/t\_order” 43 16 1 0 0 “” 0
000000000638 36000001890480 SYS_TABLES “car\_doc/t\_auth\_config” 14 8 1 0 0 “” 0
000000007B0E 1F0000021E0610 SYS_TABLES “car\_doc/t\_car\_type” 33 18 1 0 0 “” 0
000000007B14 22000001FA0E47 SYS_TABLES “car\_doc/t\_role” 44 6 1 0 0 “” 0
000000007B06 1B0000025C0256 SYS_TABLES “car\_doc/t\_dict” 35 3 1 0 0 “” 0
00000000063C 380000018B0256 SYS_TABLES “car\_doc/t\_dict” 18 3 1 0 0 “” 0
000000007B12 21000002110484 SYS_TABLES “car\_doc/t\_user” 46 9 1 0 0 “” 0
00000000063E 390000018C028B SYS_TABLES “car\_doc/t\_log” 20 5 1 0 0 “” 0
000000007B10 200000021607A6 SYS_TABLES “car\_doc/t\_advert” 30 13 1 0 0 “” 0
000000007B1A 2500000212062C SYS_TABLES “car\_doc/t\_book\_type” 32 17 1 0 0 “” 0
000000007B02 190000020F0740 SYS_TABLES “car\_doc/t\_auth\_config” 31 8 1 0 0 “” 0
000000000636 3500000188028B SYS_TABLES “car\_doc/t\_meals” 24 5 1 0 0 “” 0
000000000640 3A0000018D03FE SYS_TABLES “car\_doc/t\_news” 25 12 1 0 0 “” 0
00000000063A 370000018A04D2 SYS_TABLES “car\_doc/t\_order” 26 16 1 0 0 “” 0
000000007B08 1C000002270633 SYS_TABLES “car\_doc/t\_log” 37 5 1 0 0 “” 0
000000007B16 23000001BF0406 SYS_TABLES “car\_doc/t\_count” 34 8 1 0 0 “” 0
000000007B0A 1D0000021006DE SYS_TABLES “car\_doc/t\_news” 42 12 1 0 0 “” 0
000000007B0C 1E000001F90C68 SYS_TABLES “car\_doc/t\_feedback” 36 4 1 0 0 “” 0
000000007B20 28000001C20977 SYS_TABLES “car\_doc/t\_manager” 38 9 1 0 0 “” 0
000000007B1C 26000001FB0A24 SYS_TABLES “car\_doc/t\_manager\_authbak” 39 7 1 0 0 “” 0
000000007B1E 27000001C105F9 SYS_TABLES “car\_doc/t\_manager\_role” 40 3 1 0 0 “” 0
000000007B00 180000022607CE SYS_TABLES “car\_doc/t\_meals” 41 5 1 0 0 “” 0
000000007B18 24000001C00479 SYS_TABLES “car\_doc/t\_role\_auth” 45 3 1 0 0 “” 0
000000007B29 30000001C406EA SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING@00231” 48 4 1 0 0 “” 0
000000007B2C 32000001FE0C34 SYS_TABLES “PLEASE\_READ\_ME\_VVV/WARNING@00232” 47 4 1 0 0 “” 0
— Page id: 8, Found records: 25, Lost records: YES, Leaf page: YES
./c_parser -4Df ./pages-ibdata1/FIL_PAGE_INDEX/0000000000000001.page -t dictionary/SYS_TABLES.sql -o ./dumps/SYS_TABLES -l ./dumps/SYS_TABLES.sql
./c_parser -4Df ./pages-ibdata1/FIL_PAGE_INDEX/0000000000000003.page -t dictionary/SYS_INDEXES.sql -o ./dumps/SYS_INDEXES -l ./dumps/SYS_INDEXES.sql
./c_parser -4Df ./pages-ibdata1/FIL_PAGE_INDEX/0000000000000002.page -t dictionary/SYS_COLUMNS.sql -o ./dumps/SYS_COLUMNS -l ./dumps/SYS_COLUMNS.sql
./c_parser -4Df ./pages-ibdata1/FIL_PAGE_INDEX/0000000000000004.page -t dictionary/SYS_FIELDS.sql -o ./dumps/SYS_FIELDS -l ./dumps/SYS_FIELDS.sql
create database dictionary;
use dictionary;
mysql> source /undropmysql/dictionary/SYS_TABLES.sql
mysql> source /undropmysql/dictionary/SYS_INDEXES.sql
mysql> source /undropmysql/dictionary/SYS_FIELDS.sql
mysql> source /undropmysql/dictionary/SYS_COLUMNS.sql
mysql> source /undropmysql/dictionary/SYS_TABLES.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> .
->
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.’ at line 1
mysql> source /undropmysql/dictionary/SYS_INDEXES.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> /undropmysql/dictionary/SYS_FIELDS.sql
-> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘/undropmysql/dictionary/SYS_FIELDS.sql’ at line 1
mysql> source /undropmysql/dictionary/SYS_FIELDS.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
mysql> source /undropmysql/dictionary/SYS_COLUMNS.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
#执行前面生成的LOAD DATA语句导入恢复的记录
mysql -h127.0.0.1 -uroot -p dictionary <SYS_TABLES.sql
mysql -h127.0.0.1 -uroot -p dictionary <SYS_COLUMNS.sql
mysql -h127.0.0.1 -uroot -p dictionary <SYS_INDEXES.sql
mysql -h127.0.0.1 -uroot -p dictionary <SYS_FIELDS.sql
要用mysql_config的绝对路径
make sys_parser /usr/bin/mysql_config cc -o sys_parser sys_parser.c ‘mysql_config –cflags’ ‘mysql_config –libs’ ===>测试不行
make sys_parser /usr/bin/mysql_config cc ‘mysql_config –cflags’ ‘mysql_config –libs’ -o sys_parser sys_parser.c ===>测试不行
gcc sys_parser.c -o sys_parser $(/usr/bin/mysql_config –libs –cflags) ==》重新修改代码后按照c语言编译的方法改写通过
mysql> desc SYS_TABLES
-> ;
+————–+———————+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+————–+———————+——+—–+———+——-+
| NAME | varchar(255) | NO | PRI | | |
| ID | bigint(20) unsigned | NO | | 0 | |
| N_COLS | int(10) | YES | | NULL | |
| TYPE | int(10) unsigned | YES | | NULL | |
| MIX_ID | bigint(20) unsigned | YES | | NULL | |
| MIX_LEN | int(10) unsigned | YES | | NULL | |
| CLUSTER_NAME | varchar(255) | YES | | NULL | |
| SPACE | int(10) unsigned | YES | | NULL | |
+————–+———————+——+—–+———+——-+
8 rows in set (0.00 sec)
mysql> select * from SYS_TABLES;
+———————————-+—-+——–+——+——–+———+————–+——-+
| NAME | ID | N_COLS | TYPE | MIX_ID | MIX_LEN | CLUSTER_NAME | SPACE |
+———————————-+—-+——–+——+——–+———+————–+——-+
| car_doc/t_advert | 30 | 13 | 1 | 0 | 0 | | 0 |
| car_doc/t_auth_config | 31 | 8 | 1 | 0 | 0 | | 0 |(空表)
| car_doc/t_book_type | 32 | 17 | 1 | 0 | 0 | | 0 |
| car_doc/t_car_type | 33 | 18 | 1 | 0 | 0 | | 0 |
| car_doc/t_count | 34 | 8 | 1 | 0 | 0 | | 0 |
| car_doc/t_dict | 18 | 3 | 1 | 0 | 0 | | 0 |
| car_doc/t_feedback | 36 | 4 | 1 | 0 | 0 | | 0 |
| car_doc/t_log | 37 | 5 | 1 | 0 | 0 | | 0 |
| car_doc/t_manager | 38 | 9 | 1 | 0 | 0 | | 0 |
| car_doc/t_manager_authbak | 39 | 7 | 1 | 0 | 0 | | 0 |
| car_doc/t_manager_role | 40 | 3 | 1 | 0 | 0 | | 0 |
| car_doc/t_meals | 41 | 5 | 1 | 0 | 0 | | 0 |
| car_doc/t_news | 42 | 12 | 1 | 0 | 0 | | 0 |
| car_doc/t_order | 26 | 16 | 1 | 0 | 0 | | 0 |
| car_doc/t_role | 44 | 6 | 1 | 0 | 0 | | 0 |
| car_doc/t_role_auth | 45 | 3 | 1 | 0 | 0 | | 0 |
| car_doc/t_user | 46 | 9 | 1 | 0 | 0 | | 0 |
| PLEASE_READ_ME_VVV/WARNING | 48 | 4 | 1 | 0 | 0 | | 0 |
| PLEASE_READ_ME_VVV/WARNING@00231 | 48 | 4 | 1 | 0 | 0 | | 0 |
| PLEASE_READ_ME_VVV/WARNING@00232 | 47 | 4 | 1 | 0 | 0 | | 0 |
+———————————-+—-+——–+——+——–+———+————–+——-+
20 rows in set (0.00 sec)
gcc sys_parser.c -o sys_parser $(/usr/bin/mysql_config –libs –cflags)
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_advert
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_auth_config
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_book_type
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_car_type
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_count
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_dict
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_feedback
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_log
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_manager
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_manager_authbak
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_manager_role
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_meals
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_news
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_order
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_role
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_role_auth
./sys_parser -h127.0.0.1 -u root -p root -d dictionary car_doc/t_user
./sys_parser -h127.0.0.1 -u root -p root -d dictionary PLEASE_READ_ME_VVV/WARNING
./sys_parser -h127.0.0.1 -u root -p root -d dictionary PLEASE_READ_ME_VVV/WARNING@00231
./sys_parser -h127.0.0.1 -u root -p root -d dictionary PLEASE_READ_ME_VVV/WARNING@00232
mysql> create database car_doc;
Query OK, 1 row affected (0.00 sec)
mysql> use car_doc
Database changed
mysql> source /undropmysql/car_doc/t_advert.sql
Query OK, 0 rows affected (0.04 sec)
mysql> source /undropmysql/dumps/default/t_advert.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 30 rows affected (0.07 sec)
Records: 30 Deleted: 0 Skipped: 0 Warnings: 0
mysql> select * from car_doc;
ERROR 1146 (42S02): Table ‘car_doc.car_doc’ doesn’t exist
mysql> select * from t_advert;
+—–+—————-+——————+———————+——–+————+————+————-+———-+———+————-+—————–+————-+
| id | url | title | createor | status | createTime | updateTime | sort | updateor | picture | releaseTime | approvalHistory | offlineTime |
+—–+—————-+——————+———————+——–+————+————+————-+———-+———+————-+—————–+————-+
| 24 | 12016051209173 | 3094e08e0738c422 | 51007424128@qq.co | m | 0 | | -1300234240 | | NULL | | NULL | |
| 25 | 12016051210135 | 2dd39aef34bf64a7 | 8568144450@qq.co | m | 0 | | -1300234240 | | NULL | | NULL | |
| 26 | 12016061312503 | 19864b15399af40d | 51007424128@qq.co | m | 0 | | -1249902592 | | NULL | | NULL | |
| 119 | 12017100914075 | 290c508ebb5434bd | 8dfylxxgk@163.co | m | 0 | | -1249902592 | | NULL | | NULL | |
| 120 | 12017100914084 | 1f9fad68aa8404ae | 31007424128@qq.co | m | 0 | | -1249902592 | | NULL | | NULL | |
| 121 | 12017100914093 | 6bbabcaa806f0400 | 1zhufeicai@163.co | m | 0 | | -1249902592 | | NULL | | NULL | |
| 122 | 12018051611300 | 852199cab75a745f | e2042213325@qq.co | m | 0 | | -1317011456 | | NULL | | NULL | |
| 123 | 12018052315465 | 3b5ff7ba13b784f9 | e2042213325@qq.co | m | 0 | | -1300234240 | | NULL | | NULL | |
| 124 | 12018081413501 | 254bdc81e991a495 | bberling@livemail.t | w | 0 | | -1300234240 | | NULL | | NULL | |
| 125 | 12018082911062 | 85f7a36723107478 | 384558040@qq.co | m | 0 | | -1317011456 | | NULL | | NULL | |
| 126 | 12018111208521 | 1aeafacfb1013418 | azhufeicai@163.co | m | 0 | | -1249902592 | | NULL | | NULL | |
+—–+—————-+——————+———————+——–+————+————+————-+———-+———+————-+—————–+————-+
11 rows in set (0.00 sec)
mysql>
======
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000016.page -t car_doc/t_auth_config.sql > dumps/default/t_auth_config 2> dumps/default/t_auth_config.sql
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000047.page -t car_doc/t_auth_config.sql > dumps/default/t_auth_config 2> dumps/default/t_auth_config.sql
source /undropmysql/car_doc/t_auth_config.sql
source /undropmysql/dumps/default/t_auth_config.sql
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_auth_config.sql
Query OK, 0 rows affected (0.02 sec)
mysql> desc t_auth_config
-> ;
+————-+————-+——+—–+———+——-+
| Field | Type | Null | Key | Default | Extra |
+————-+————-+——+—–+———+——-+
| id | bigint(20) | NO | PRI | NULL | |
| name | varchar(40) | NO | | NULL | |
| url | varchar(60) | NO | | NULL | |
| status | int(11) | NO | | NULL | |
| pid | bigint(20) | NO | | NULL | |
| createtime | datetime | NO | | NULL | | 类型改为varchar
| operator | varchar(45) | YES | | NULL | |
| operatetime | datetime | YES | | NULL | |
+————-+————-+——+—–+———+——-+ 类型改为varchar
8 rows in set (0.01 sec)
mysql> source /undropmysql/car_doc/t_auth_config.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_auth_config.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 67 rows affected (0.01 sec)
Records: 34 Deleted: 33 Skipped: 0 Warnings: 0
======重要 表数据为如下 ==== 因为时间导出有问题,导入mysql有异常故截取记录 以供查询(有33条记录标记为被正常删除过的) =========
— Page id: 415, Format: COMPACT, Records list: Valid, Expected records: (18 18)
000000180000 20001180000001 t_auth_config 6442450944 “” “” 0 -9223371929413474304 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:26”
000000190400 28001180000001 t_auth_config 6442450944 “” “” 0 -9223371925185613824 “0789-56-88 90:47:04” “” “0000-00-00 00:00:27”
0000001A0000 30001180000001 t_auth_config 6442450944 “” “” 0 -9223371920890644480 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:28”
0000001B0000 38001180000001 t_auth_config 6442450944 “” “” 0 -9223371916595675136 “0789-56-88 90:47:04” “” NULL
0000001C0000 40001180000001 t_auth_config 6442450944 “” “” 0 -9223371912233596928 “0789-56-88 90:47:04” NULL NULL
0000001D0400 48001180000001 t_auth_config 6442450944 “” “” 0 -9223371908005736448 “0789-56-88 90:47:04” “” “0000-00-00 00:00:31”
0000001E0000 50001180000001 t_auth_config 6442450944 “” “” 0 -9223371903710767104 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:35”
0000001F0000 58001180000001 t_auth_config 6442450944 “” “” 0 -9223371886530895872 “0789-56-88 90:47:04” “” NULL
000000230000 60001180000001 t_auth_config 6442450944 “” “” 0 -9223371882168817664 “0789-56-88 90:47:04” NULL NULL
000000240400 68001180000001 t_auth_config 6442450944 “” “” 0 -9223371877940957184 “0789-56-88 90:47:04” NULL NULL
000000250000 70001180000001 t_auth_config 6442450944 “” “” 0 -9223371873645987840 “0789-56-88 90:47:04” “” “0000-00-00 00:00:44”
000000260000 78001180000001 t_auth_config 6442450944 “” “” 0 -9223371847876182016 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:47”
0000002C0000 80001180000001 t_auth_config 6442450944 “” “” 0 -9223371834991278080 “0789-56-88 90:47:04” “” NULL
0000002F0000 88001180000001 t_auth_config 6442450944 “” “” 0 -9223371830696308736 “0789-56-88 90:47:04” “” “0000-00-00 00:00:49”
000000300000 90001180000001 t_auth_config 6442450944 “” “” 0 -9223371826401339138 “5150-81-54 22:05:44” NULL NULL
000000310000 98FED280000001 t_auth_config 6442450944 “” “” 0 -9223371822106411008 “0000-00-00 00:00:00” “” “0000-00-00 00:00:00”
000000320000 00000000000000 t_auth_config 6442450944 “” “” -2147483648 -9223372036854775808 “0000-00-00 00:00:00” NULL “0000-00-00 00:00:00”
— Page id: 415, Found records: 17, Lost records: YES, Leaf page: YES
— Page id: 415, Format: COMPACT, Records list: Valid, Expected records: (18 18)
000000180000 20001180000001 t_auth_config 6442450944 “” “” 0 -9223371929413474304 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:26”
000000190400 28001180000001 t_auth_config 6442450944 “” “” 0 -9223371925185613824 “0789-56-88 90:47:04” “” “0000-00-00 00:00:27”
0000001A0000 30001180000001 t_auth_config 6442450944 “” “” 0 -9223371920890644480 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:28”
0000001B0000 38001180000001 t_auth_config 6442450944 “” “” 0 -9223371916595675136 “0789-56-88 90:47:04” “” NULL
0000001C0000 40001180000001 t_auth_config 6442450944 “” “” 0 -9223371912233596928 “0789-56-88 90:47:04” NULL NULL
0000001D0400 48001180000001 t_auth_config 6442450944 “” “” 0 -9223371908005736448 “0789-56-88 90:47:04” “” “0000-00-00 00:00:31”
0000001E0000 50001180000001 t_auth_config 6442450944 “” “” 0 -9223371903710767104 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:35”
0000001F0000 58001180000001 t_auth_config 6442450944 “” “” 0 -9223371886530895872 “0789-56-88 90:47:04” “” NULL
000000230000 60001180000001 t_auth_config 6442450944 “” “” 0 -9223371882168817664 “0789-56-88 90:47:04” NULL NULL
000000240400 68001180000001 t_auth_config 6442450944 “” “” 0 -9223371877940957184 “0789-56-88 90:47:04” NULL NULL
000000250000 70001180000001 t_auth_config 6442450944 “” “” 0 -9223371873645987840 “0789-56-88 90:47:04” “” “0000-00-00 00:00:44”
000000260000 78001180000001 t_auth_config 6442450944 “” “” 0 -9223371847876182016 “0789-56-88 90:47:04” NULL “0000-00-00 00:00:47”
0000002C0000 80001180000001 t_auth_config 6442450944 “” “” 0 -9223371834991278080 “0789-56-88 90:47:04” “” NULL
0000002F0000 88001180000001 t_auth_config 6442450944 “” “” 0 -9223371830696308736 “0789-56-88 90:47:04” “” “0000-00-00 00:00:49”
000000300000 90001180000001 t_auth_config 6442450944 “” “” 0 -9223371826401339138 “5150-81-54 22:05:44” NULL NULL
000000310000 98FED280000001 t_auth_config 6442450944 “” “” 0 -9223371822106411008 “0000-00-00 00:00:00” “” “0000-00-00 00:00:00”
000000320000 00000000000000 t_auth_config 6442450944 “” “” -2147483648 -9223372036854775808 “0000-00-00 00:00:00” NULL “0000-00-00 00:00:00”
— Page id: 415, Found records: 17, Lost records: YES, Leaf page: YES
=====
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000048.page -t car_doc/t_book_type.sql > dumps/default/t_book_type 2> dumps/default/t_book_type.sql
mysql> source /undropmysql/dumps/default/t_book_type.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 554 rows affected (0.12 sec)
Records: 554 Deleted: 0 Skipped: 0 Warnings: 0
修改了 t_book_type表的字段approvalHistory的属性text为varchar(20000)
====
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000049.page -t car_doc/t_car_type.sql > dumps/default/t_car_type 2> dumps/default/t_car_type.sql
source /undropmysql/car_doc/t_car_type.sql
source /undropmysql/dumps/default/t_car_type.sql
mysql>
mysql>
mysql> source /undropmysql/car_doc/t_car_type.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_car_type.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 38 rows affected (0.00 sec)
Records: 38 Deleted: 0 Skipped: 0 Warnings: 0
====
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000050.page -t car_doc/t_count.sql > dumps/default/t_count 2> dumps/default/t_count.sql
source /undropmysql/car_doc/t_count.sql
source /undropmysql/dumps/default/t_count.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000050.page -t car_doc/t_count.sql > dumps/default/t_count 2> dumps/default/t_count.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 42
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_count.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_count.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 30 rows affected (0.01 sec)
Records: 30 Deleted: 0 Skipped: 0 Warnings: 0
======
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000023.page -t car_doc/t_dict.sql > dumps/default/t_dict 2> dumps/default/t_dict.sql
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000051.page -t car_doc/t_dict.sql > dumps/default/t_dict 2> dumps/default/t_dict.sql
source /undropmysql/car_doc/t_dict.sql
source /undropmysql/dumps/default/t_dict.sql
空表
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000023.page -t car_doc/t_dict.sql > dumps/default/t_dict 2> dumps/default/t_dict.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_dict.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_dict.sql
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘stat: No such file or directory
Can’t stat /undropmysql/pages-ibdata1/FIL_PAGE_I’ at line 1
mysql> source /undropmysql/dumps/default/t_dict.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 14 rows affected (0.00 sec)
Records: 14 Deleted: 0 Skipped: 0 Warnings: 0
======
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000052.page -t car_doc/t_feedback.sql > dumps/default/t_feedback 2> dumps/default/t_feedback.sql
source /undropmysql/car_doc/t_feedback.sql
source /undropmysql/dumps/default/t_feedback.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000052.page -t car_doc/t_feedback.sql > dumps/default/t_feedback 2> dumps/default/t_feedback.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_feedback.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_feedback.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 20 rows affected (0.01 sec)
Records: 20 Deleted: 0 Skipped: 0 Warnings: 0
======
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000025.page -t car_doc/t_log.sql > dumps/default/t_log 2> dumps/default/t_log.sql
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000053.page -t car_doc/t_log.sql > dumps/default/t_log 2> dumps/default/t_log.sql
source /undropmysql/car_doc/t_log.sql
source /undropmysql/dumps/default/t_log.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000053.page -t car_doc/t_log.sql > dumps/default/t_log 2> dumps/default/t_log.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_log.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_log.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 1138 rows affected (0.05 sec)
Records: 1138 Deleted: 0 Skipped: 0 Warnings: 0
========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000055.page -t car_doc/t_manager.sql > dumps/default/t_manager 2> dumps/default/t_manager.sql
source /undropmysql/car_doc/t_manager.sql
source /undropmysql/dumps/default/t_manager.sql
空表无数据(或者数据丢失)
[root@localhost default]# cat t_manager
— Page id: 328, Format: COMPACT, Records list: Valid, Expected records: (1 1)
— Page id: 328, Found records: 0, Lost records: YES, Leaf page: YES
— Page id: 328, Format: COMPACT, Records list: Valid, Expected records: (1 1)
— Page id: 328, Found records: 0, Lost records: YES, Leaf page: YES
[root@localhost default]# cat t_manager.sql
SET FOREIGN_KEY_CHECKS=0;
LOAD DATA LOCAL INFILE ‘/undropmysql/dumps/default/t_manager’ REPLACE INTO TABLE `t_manager` CHARACTER SET UTF8 FIELDS TERMINATED BY ‘\t’ OPTIONALLY ENCLOSED BY ‘”‘ LINES STARTING BY ‘t_manager\t’ (`id`, `account`, `password`, `isdisable`);
— STATUS {“records_expected”: 2, “records_dumped”: 0, “records_lost”: true} STATUS END
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_manager.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_manager.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Records: 0 Deleted: 0 Skipped: 0 Warnings: 0
=========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000058.page -t car_doc/t_manager_authbak.sql > dumps/default/t_manager_authbak 2> dumps/default/t_manager_authbak.sql
source /undropmysql/car_doc/t_manager_authbak.sql
source /undropmysql/dumps/default/t_manager_authbak.sql
倒数第二个字段有乱码,无法识别因此保留数据给予手工录入
— Page id: 342, Format: COMPACT, Records list: Valid, Expected records: (18 18)
00000000066D DB0000015D0110 t_manager_authbak 1 61 28 1 2016-04-09 01:06:10 huanad 2016-04-09 01:06:10
00000000066D DB0000015D0120 t_manager_authbak 2 61 24 1 2016-04-09 13:37:08 huanad 2016-04-09 13:37:08
00000000066D DB0000015D0130 t_manager_authbak 3 61 25 1 2016-04-09 13:37:25 huanad 2016-04-09 13:37:25
00000000066D DB0000015D0140 t_manager_authbak 4 61 26 1 2016-04-09 13:37:43 huanad 2016-04-09 13:37:43
00000000066D DB0000015D0150 t_manager_authbak 97 61 29 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0160 t_manager_authbak 99 61 30 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0170 t_manager_authbak 101 61 31 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0180 t_manager_authbak 103 61 35 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0190 t_manager_authbak 105 61 36 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01A0 t_manager_authbak 107 61 37 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01B0 t_manager_authbak 109 61 38 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01C0 t_manager_authbak 111 61 43 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01D0 t_manager_authbak 113 61 44 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01E0 t_manager_authbak 115 61 47 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01F0 t_manager_authbak 117 61 48 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0200 t_manager_authbak 119 61 49 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0210 t_manager_authbak 121 61 50 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0220 t_manager_authbak 123 61 59 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
— Page id: 342, Found records: 18, Lost records: NO, Leaf page: YES
— Page id: 342, Format: COMPACT, Records list: Valid, Expected records: (18 18)
00000000066D DB0000015D0110 t_manager_authbak 1 61 28 1 2016-04-09 01:06:10 huanad 2016-04-09 01:06:10
00000000066D DB0000015D0120 t_manager_authbak 2 61 24 1 2016-04-09 13:37:08 huanad 2016-04-09 13:37:08
00000000066D DB0000015D0130 t_manager_authbak 3 61 25 1 2016-04-09 13:37:25 huanad 2016-04-09 13:37:25
00000000066D DB0000015D0140 t_manager_authbak 4 61 26 1 2016-04-09 13:37:43 huanad 2016-04-09 13:37:43
00000000066D DB0000015D0150 t_manager_authbak 97 61 29 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0160 t_manager_authbak 99 61 30 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0170 t_manager_authbak 101 61 31 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0180 t_manager_authbak 103 61 35 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0190 t_manager_authbak 105 61 36 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01A0 t_manager_authbak 107 61 37 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01B0 t_manager_authbak 109 61 38 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01C0 t_manager_authbak 111 61 43 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01D0 t_manager_authbak 113 61 44 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01E0 t_manager_authbak 115 61 47 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D01F0 t_manager_authbak 117 61 48 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0200 t_manager_authbak 119 61 49 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0210 t_manager_authbak 121 61 50 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
00000000066D DB0000015D0220 t_manager_authbak 123 61 59 1 2016-01-12 16:59:25 Shuanad 2016-01-12 16:59:25
— Page id: 342, Found records: 18, Lost records: NO, Leaf page: YES
=========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000062.page -t car_doc/t_manager_role.sql > dumps/default/t_manager_role 2> dumps/default/t_manager_role.sql
source /undropmysql/car_doc/t_manager_role.sql
source /undropmysql/dumps/default/t_manager_role.sql
Database changed
mysql> source /undropmysql/car_doc/t_manager_role.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_manager_role.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 5 rows affected (0.00 sec)
Records: 5 Deleted: 0 Skipped: 0 Warnings: 0
==========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000063.page -t car_doc/t_meals.sql > dumps/default/t_meals 2> dumps/default/t_meals.sql
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000035.page -t car_doc/t_meals.sql > dumps/default/t_meals 2> dumps/default/t_meals.sql
source /undropmysql/car_doc/t_meals.sql
source /undropmysql/dumps/default/t_meals.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 60
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/dumps/default/t_meals.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 10 rows affected (0.00 sec)
Records: 10 Deleted: 0 Skipped: 0 Warnings: 0
==========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000064.page -t car_doc/t_news.sql > dumps/default/t_news 2> dumps/default/t_news.sql
source /undropmysql/car_doc/t_news.sql
source /undropmysql/dumps/default/t_news.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000064.page -t car_doc/t_news.sql > dumps/default/t_news 2> dumps/default/t_news.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 61
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_news.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_news.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 8 rows affected (0.01 sec)
Records: 8 Deleted: 0 Skipped: 0 Warnings: 0
==========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000065.page -t car_doc/t_order.sql > dumps/default/t_order 2> dumps/default/t_order.sql
source /undropmysql/car_doc/t_order.sql
source /undropmysql/dumps/default/t_order.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000065.page -t car_doc/t_order.sql > dumps/default/t_order 2> dumps/default/t_order.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 62
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_order.sql
Query OK, 0 rows affected (0.03 sec)
mysql> source /undropmysql/dumps/default/t_order.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 318 rows affected (0.01 sec)
Records: 318 Deleted: 0 Skipped: 0 Warnings: 0
===========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000066.page -t car_doc/t_role.sql > dumps/default/t_role 2> dumps/default/t_role.sql
source /undropmysql/car_doc/t_role.sql
source /undropmysql/dumps/default/t_role.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000066.page -t car_doc/t_role.sql > dumps/default/t_role 2> dumps/default/t_role.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 63
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql>
mysql> source /undropmysql/car_doc/t_role.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_role.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 14 rows affected (0.01 sec)
Records: 14 Deleted: 0 Skipped: 0 Warnings: 0
=======
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000067.page -t car_doc/t_role_auth.sql > dumps/default/t_role_auth 2> dumps/default/t_role_auth.sql
source /undropmysql/car_doc/t_role_auth.sql
source /undropmysql/dumps/default/t_role_auth.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000067.page -t car_doc/t_role_auth.sql > dumps/default/t_role_auth 2> dumps/default/t_role_auth.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 64
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql>
mysql> source /undropmysql/car_doc/t_role_auth.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_role_auth.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 103 rows affected (0.01 sec)
Records: 103 Deleted: 0 Skipped: 0 Warnings: 0
=======
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000070.page -t car_doc/t_user.sql > dumps/default/t_user 2> dumps/default/t_user.sql
source /undropmysql/car_doc/t_user.sql
source /undropmysql/dumps/default/t_user.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000070.page -t car_doc/t_user.sql > dumps/default/t_user 2> dumps/default/t_user.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 66
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use car_doc
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/car_doc/t_user.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/t_user.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 271 rows affected (0.01 sec)
Records: 271 Deleted: 0 Skipped: 0 Warnings: 0
=========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000072.page -t PLEASE_READ_ME_VVV/WARNING.sql > dumps/default/WARNING 2> dumps/default/WARNING.sql
source /undropmysql/PLEASE_READ_ME_VVV/WARNING.sql
source /undropmysql/dumps/default/WARNING.sql
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use PLEASE_READ_ME_VVV
Database changed
mysql> source /undropmysql/PLEASE_READ_ME_VVV/WARNING.sql
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”WARNING'(
‘id’ INT NOT NULL,
‘warning’ TEXT,
‘Bitcoin_A’ at line 1
mysql> source /undropmysql/PLEASE_READ_ME_VVV/WARNING.sql
Query OK, 0 rows affected (0.02 sec)
mysql> source /undropmysql/dumps/default/WARNING.sql;
Query OK, 0 rows affected (0.00 sec)
Query OK, 3 rows affected (0.00 sec)
Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
=========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000072.page -t PLEASE_READ_ME_VVV/WARNING@00231.sql > dumps/default/WARNING@00231 2> dumps/default/WARNING@00231.sql
source /undropmysql/PLEASE_READ_ME_VVV/WARNING@00231.sql
source /undropmysql/dumps/default/WARNING@00231.sql
[root@localhost undropmysql]# ./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000072.page -t PLEASE_READ_ME_VVV/WARNING@00231.sql > dumps/default/WARNING@00231 2> dumps/default/WARNING@00231.sql
[root@localhost undropmysql]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
[root@localhost undropmysql]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 72
Server version: 5.7.26 MySQL Community Server (GPL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> use PLEASE_READ_ME_VVV
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/PLEASE_READ_ME_VVV/WARNING@00231.sql
ERROR 1050 (42S01): Table ‘WARNING@00231’ already exists
mysql> source /undropmysql/dumps/default/WARNING@00231.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 3 rows affected (0.00 sec)
Records: 3 Deleted: 0 Skipped: 0 Warnings: 0
=========
./c_parser -6f /undropmysql/pages-ibdata1/FIL_PAGE_INDEX/0000000000000071.page -t PLEASE_READ_ME_VVV/WARNING@00232.sql > dumps/default/WARNING@00232 2> dumps/default/WARNING@00232.sql
source /undropmysql/PLEASE_READ_ME_VVV/WARNING@00232.sql
source /undropmysql/dumps/default/WARNING@00232.sql
mysql> use PLEASE_READ_ME_VVV
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> source /undropmysql/dumps/default/WARNING@00232.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 2 rows affected (0.01 sec)
Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
恢复完成
==================================================================
==========================