0

我现在真的很困惑如何从我的 ibdata1 获取当前结果的正确页码。大多数文档都包含并指示这样做:

启用此监视器后,我们必须查看 MySQL 错误日志 (/var/log/mysql/error.log) 才能找到损坏表的页面索引:

表:名称数据库/sp_account,id 0 85,列 23,索引 2,appr.rows 220
...
索引:名称 PRIMARY,id 0 215,字段 1/22,uniq 1,类型 3
根页面 401,appr.key vals 220,叶子页面 3,大小页面 4
...
在此输出中,它表明我们必须查看位于提取页面的 0-215 子目录中的页面(即 pages-1328713071/FIL_PAGE_INDEX/0-215/)。

然后,我们必须将页面文件合并为一个:

查找 pages-1328713071/FIL_PAGE_INDEX/0-215/ -type f -name '*.page' | 排序-n | xargs 猫 > 合并文件

但是,我这里是这样的:

表:名称 db/tablename,id 512,标志 29,列 16,索引 9,appr.rows 0
  列:id:DATA_INT DATA_BINARY_TYPE DATA_NOT_NULL len 4;createdAt: DATA_FIXBINARY DATA_BINARY_TYPE len 5; 更新时间:DATA_FIXBINARY DATA_BINARY_TYPE len 5;nid:DATA_VARMYSQL 长度 765;ngroup:DATA_VARMYSQL 长度 765;游览:DATA_VARMYSQL len 765;值:DATA_VARMYSQL 长度 765;行动:DATA_VARMYSQL 长度 765;IP地址:DATA_VARMYSQL len 765;浏览器:DATA_VARMYSQL len 765;isMonitoring:DATA_INT DATA_BINARY_TYPE len 1;isEmbedded:DATA_INT DATA_BINARY_TYPE len 1;公司 ID:DATA_INT DATA_BINARY_TYPE len 4;DB_ROW_ID:DATA_SYS prtype 256 len 6;DB_TRX_ID:DATA_SYS prtype 257 len 6;DB_ROLL_PTR:DATA_SYS prtype 258 len 7;
  索引:名称 PRIMARY,id 586,字段 1/15,uniq 1,类型 3
   根页面 3,appr.key vals 100,叶子页面 1,大小页面 1

如果您会注意到文档中第一个的 PRIMARY KEY id 值是 id 0 215,那么我的结果中只有这个 id 586。

请帮助我,任何帮助都非常感谢。

干杯,

4

2 回答 2

0

为什么 FIL_PAGE_INDEX 是空的?甚至.ibd 文件的大小也几乎是14GB?

打开文件:/home/data/mysql/mysql-data/nickelled/Tracking.ibd 文件信息:

ID of device containing file:        64770
inode number:                      3932162
protection:                         100640 (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:       28860440

打开文件:/home/data/mysql/mysql-data/nickelled/Tracking.ibd 文件信息:

time of last access:            1466763875 Fri Jun 24 06:24:35 2016
time of last modification:      1465757623 Sun Jun 12 14:53:43 2016
time of last status change:     1466770800 Fri Jun 24 08:20:00 2016
ID of device containing file:        64770
inode number:                      3932162
protection:                         100640 (regular file)
total size, in bytes:          14776532992 (13.762 GiB)

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:       28860440
Size to process:               14776532992 (13.762 GiB)
time of last access:            1466763875 Fri Jun 24 06:24:35 2016
time of last modification:      1465757623 Sun Jun 12 14:53:43 2016
time of last status change:     1466770800 Fri Jun 24 08:20:00 2016
total size, in bytes:          14776532992 (13.762 GiB)

Size to process:               14776532992 (13.762 GiB)
Worker(0): 1.70% done. 2016-06-24 08:31:14 ETA(in 00:01:01). Processing speed: 111.781 MiB/sec
Worker(1): 1.93% done. 2016-06-24 08:31:07 ETA(in 00:00:54). Processing speed: 127.750 MiB/sec
Worker(0): 3.63% done. 2016-06-24 08:31:04 ETA(in 00:00:50). Processing speed: 135.734 MiB/sec
Worker(1): 4.08% done. 2016-06-24 08:30:58 ETA(in 00:00:44). Processing speed: 151.703 MiB/sec
Worker(1): 6.12% done. 2016-06-24 08:31:01 ETA(in 00:00:46). Processing speed: 143.719 MiB/sec
Worker(0): 5.67% done. 2016-06-24 08:31:01 ETA(in 00:00:46). Processing speed: 143.719 MiB/sec
Worker(1): 7.93% done. 2016-06-24 08:31:06 ETA(in 00:00:50). Processing speed: 127.750 MiB/sec
Worker(0): 7.71% done. 2016-06-24 08:31:01 ETA(in 00:00:45). Processing speed: 143.719 MiB/sec
Worker(1): 10.66% done. 2016-06-24 08:30:49 ETA(in 00:00:32). Processing speed: 191.844 MiB/sec
Worker(0): 9.75% done. 2016-06-24 08:31:01 ETA(in 00:00:44). Processing speed: 143.719 MiB/sec
Worker(1): 13.38% done. 2016-06-24 08:30:49 ETA(in 00:00:31). Processing speed: 192.000 MiB/sec
Worker(0): 11.67% done. 2016-06-24 08:31:03 ETA(in 00:00:45). Processing speed: 135.734 MiB/sec
Worker(1): 16.33% done. 2016-06-24 08:30:47 ETA(in 00:00:28). Processing speed: 208.000 MiB/sec
Worker(0): 13.49% done. 2016-06-24 08:31:06 ETA(in 00:00:47). Processing speed: 127.750 MiB/sec
Worker(1): 19.51% done. 2016-06-24 08:30:45 ETA(in 00:00:25). Processing speed: 224.000 MiB/sec
Worker(0): 15.41% done. 2016-06-24 08:31:03 ETA(in 00:00:43). Processing speed: 135.734 MiB/sec
Worker(1): 22.69% done. 2016-06-24 08:30:45 ETA(in 00:00:24). Processing speed: 224.000 MiB/sec
Worker(0): 17.34% done. 2016-06-24 08:31:03 ETA(in 00:00:42). Processing speed: 135.734 MiB/sec
Worker(1): 25.64% done. 2016-06-24 08:30:47 ETA(in 00:00:25). Processing speed: 208.000 MiB/sec
Worker(0): 19.26% done. 2016-06-24 08:31:03 ETA(in 00:00:41). Processing speed: 135.734 MiB/sec
Worker(0): 21.08% done. 2016-06-24 08:31:06 ETA(in 00:00:43). Processing speed: 127.750 MiB/sec
Worker(1): 28.71% done. 2016-06-24 08:30:46 ETA(in 00:00:23). Processing speed: 216.000 MiB/sec
Worker(1): 31.55% done. 2016-06-24 08:30:48 ETA(in 00:00:24). Processing speed: 200.000 MiB/sec
Worker(0): 23.00% done. 2016-06-24 08:31:03 ETA(in 00:00:39). Processing speed: 135.734 MiB/sec
Worker(0): 24.82% done. 2016-06-24 08:31:06 ETA(in 00:00:41). Processing speed: 127.750 MiB/sec
Worker(1): 34.50% done. 2016-06-24 08:30:47 ETA(in 00:00:22). Processing speed: 208.000 MiB/sec
Worker(1): 37.45% done. 2016-06-24 08:30:47 ETA(in 00:00:21). Processing speed: 208.000 MiB/sec
Worker(0): 26.86% done. 2016-06-24 08:31:01 ETA(in 00:00:35). Processing speed: 143.719 MiB/sec
Worker(1): 40.40% done. 2016-06-24 08:30:47 ETA(in 00:00:20). Processing speed: 208.000 MiB/sec
Worker(0): 28.78% done. 2016-06-24 08:31:03 ETA(in 00:00:36). Processing speed: 135.734 MiB/sec
Worker(1): 44.15% done. 2016-06-24 08:30:42 ETA(in 00:00:14). Processing speed: 264.000 MiB/sec
Worker(0): 30.82% done. 2016-06-24 08:31:01 ETA(in 00:00:33). Processing speed: 143.719 MiB/sec
Worker(0): 32.64% done. 2016-06-24 08:31:06 ETA(in 00:00:37). Processing speed: 127.750 MiB/sec
Worker(1): 47.21% done. 2016-06-24 08:30:46 ETA(in 00:00:17). Processing speed: 216.000 MiB/sec
Worker(0): 34.56% done. 2016-06-24 08:31:03 ETA(in 00:00:33). Processing speed: 135.734 MiB/sec
Worker(1): 50.28% done. 2016-06-24 08:30:46 ETA(in 00:00:16). Processing speed: 216.000 MiB/sec
Worker(1): 53.57% done. 2016-06-24 08:30:45 ETA(in 00:00:14). Processing speed: 232.000 MiB/sec
Worker(0): 36.49% done. 2016-06-24 08:31:03 ETA(in 00:00:32). Processing speed: 135.734 MiB/sec
Worker(0): 38.30% done. 2016-06-24 08:31:06 ETA(in 00:00:34). Processing speed: 127.750 MiB/sec
Worker(1): 56.75% done. 2016-06-24 08:30:45 ETA(in 00:00:13). Processing speed: 224.000 MiB/sec
Worker(1): 59.59% done. 2016-06-24 08:30:47 ETA(in 00:00:14). Processing speed: 200.000 MiB/sec
Worker(0): 40.23% done. 2016-06-24 08:31:04 ETA(in 00:00:31). Processing speed: 135.734 MiB/sec
Worker(1): 62.43% done. 2016-06-24 08:30:47 ETA(in 00:00:13). Processing speed: 200.000 MiB/sec
Worker(0): 42.04% done. 2016-06-24 08:31:05 ETA(in 00:00:31). Processing speed: 127.750 MiB/sec
Worker(0): 43.97% done. 2016-06-24 08:31:04 ETA(in 00:00:29). Processing speed: 135.734 MiB/sec
Worker(1): 65.27% done. 2016-06-24 08:30:47 ETA(in 00:00:12). Processing speed: 200.000 MiB/sec
Worker(1): 68.45% done. 2016-06-24 08:30:45 ETA(in 00:00:09). Processing speed: 224.000 MiB/sec
Worker(0): 46.46% done. 2016-06-24 08:30:57 ETA(in 00:00:21). Processing speed: 175.656 MiB/sec
Worker(0): 48.84% done. 2016-06-24 08:30:58 ETA(in 00:00:21). Processing speed: 167.672 MiB/sec
Worker(1): 71.51% done. 2016-06-24 08:30:46 ETA(in 00:00:09). Processing speed: 216.000 MiB/sec
Worker(1): 74.46% done. 2016-06-24 08:30:46 ETA(in 00:00:08). Processing speed: 208.000 MiB/sec
Worker(0): 51.33% done. 2016-06-24 08:30:57 ETA(in 00:00:19). Processing speed: 175.656 MiB/sec
Worker(1): 77.53% done. 2016-06-24 08:30:46 ETA(in 00:00:07). Processing speed: 216.000 MiB/sec
Worker(0): 53.94% done. 2016-06-24 08:30:56 ETA(in 00:00:17). Processing speed: 183.641 MiB/sec
Worker(1): 80.60% done. 2016-06-24 08:30:46 ETA(in 00:00:06). Processing speed: 216.000 MiB/sec
Worker(0): 56.21% done. 2016-06-24 08:30:59 ETA(in 00:00:19). Processing speed: 159.718 MiB/sec
Worker(1): 83.77% done. 2016-06-24 08:30:46 ETA(in 00:00:05). Processing speed: 224.000 MiB/sec
Worker(0): 58.70% done. 2016-06-24 08:30:57 ETA(in 00:00:16). Processing speed: 175.703 MiB/sec
Worker(0): 60.85% done. 2016-06-24 08:31:00 ETA(in 00:00:18). Processing speed: 151.703 MiB/sec
Worker(1): 87.64% done. 2016-06-24 08:30:45 ETA(in 00:00:03). Processing speed: 272.000 MiB/sec
Worker(1): 90.47% done. 2016-06-24 08:30:46 ETA(in 00:00:03). Processing speed: 200.000 MiB/sec
Worker(0): 62.89% done. 2016-06-24 08:31:01 ETA(in 00:00:18). Processing speed: 143.719 MiB/sec
Worker(1): 93.65% done. 2016-06-24 08:30:45 ETA(in 00:00:01). Processing speed: 224.000 MiB/sec
Worker(0): 65.16% done. 2016-06-24 08:30:59 ETA(in 00:00:15). Processing speed: 159.688 MiB/sec
Worker(1): 96.60% done. 2016-06-24 08:30:46 ETA(in 00:00:01). Processing speed: 208.000 MiB/sec
Worker(0): 67.31% done. 2016-06-24 08:31:00 ETA(in 00:00:15). Processing speed: 151.703 MiB/sec
Worker(1): 99.67% done. 2016-06-24 08:30:46 ETA(in 00:00:00). Processing speed: 216.000 MiB/sec
Worker(0): 69.35% done. 2016-06-24 08:31:01 ETA(in 00:00:15). Processing speed: 143.719 MiB/sec
Worker(0): 72.41% done. 2016-06-24 08:30:56 ETA(in 00:00:09). Processing speed: 215.578 MiB/sec
Worker(0): 76.38% done. 2016-06-24 08:30:53 ETA(in 00:00:05). Processing speed: 279.453 MiB/sec
Worker(0): 80.91% done. 2016-06-24 08:30:53 ETA(in 00:00:04). Processing speed: 319.375 MiB/sec
Worker(0): 84.20% done. 2016-06-24 08:30:54 ETA(in 00:00:04). Processing speed: 231.547 MiB/sec
Worker(0): 87.03% done. 2016-06-24 08:30:55 ETA(in 00:00:04). Processing speed: 199.609 MiB/sec
Worker(0): 90.66% done. 2016-06-24 08:30:54 ETA(in 00:00:02). Processing speed: 255.500 MiB/sec
Worker(0): 94.51% done. 2016-06-24 08:30:54 ETA(in 00:00:01). Processing speed: 271.469 MiB/sec
Worker(0): 98.36% done. 2016-06-24 08:30:54 ETA(in 00:00:00). Processing speed: 271.469 MiB/sec

所有工人在 42 秒内完成

<pre>[root@cos6PXE undrop-for-innodb-master]# cd pages-Tracking.ibd/FIL_PAGE_INDEX/
[root@cos6PXE FIL_PAGE_INDEX]# ll
total 0 <pre/>

我无法继续使用 twindb 工具恢复数据,因为那完全是空的。

于 2016-06-24T12:36:31.937 回答
0

因为 undrop-for-innodb 中的 stream_parser 不支持压缩表空间。您应该使用https://code.launchpad.net/~akuzminsky/percona-data-recovery-tool-for-innodb/decompress中的 page_parser

于 2016-06-24T13:29:09.947 回答