mysql產生資料字典

來源:互聯網
上載者:User

標籤:create   clu   parse   _id   change   AC   conf   recover   img   

git clone https://github.com/twindb/undrop-for-innodb.git

make

[[email protected] undrop-for-innodb]# makecc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include -c stream_parser.ccc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include  -pthread -lm  stream_parser.o -o stream_parserflex  sql_parser.lsql_parser.l:66: warning, the character range [                                               -Y] is ambiguous in a case-insensitive scannersql_parser.l:66: warning, the character range [a] is ambiguous in a case-insensitive scannerbison  -o sql_parser.c sql_parser.ysql_parser.y: conflicts: 6 shift/reducecc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include -c sql_parser.clex.yy.c:3430: warning: ‘yyunput’ defined but not usedlex.yy.c:3471: warning: ‘input’ defined but not usedcc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include -c c_parser.c./include/ctype-latin1.c:359: warning: ‘my_mb_wc_latin1’ defined but not used./include/ctype-latin1.c:372: warning: ‘my_wc_mb_latin1’ defined but not usedcc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include -c tables_dict.ccc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include -c print_data.ccc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe -I./include -c check_data.ccc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe  -I./include  sql_parser.o c_parser.o tables_dict.o print_data.o check_data.o -o c_parser -pthread -lmcc -D_FILE_OFFSET_BITS=64 -Wall -g -O3 -pipe  -I./include -o innochecksum_changer innochecksum.c
View Code

建立恢複資料庫

create database recovery;

抽取資料字典

create database recovery;./stream_parser -f /data/mysql//ibdata1 mkdir -p dumps/default ./c_parser -6f pages-ibdata1/FIL_PAGE_INDEX/0000000000000001.page -t dictionary/SYS_TABLES.sql > dumps/default/SYS_TABLES 2> dumps/default/SYS_TABLES.sql ./c_parser -6f pages-ibdata1/FIL_PAGE_INDEX/0000000000000003.page -t dictionary/SYS_INDEXES.sql > dumps/default/SYS_INDEXES 2> dumps/default/SYS_INDEXES.sql 載入資料 mysql -u root -p recovery < dictionary/SYS_TABLES.sql mysql -u root -p recovery < dictionary/SYS_INDEXES.sql mysql -u root -p recovery < dumps/default/SYS_TABLES.sql mysql -u root -p recovery < dumps/default/SYS_INDEXES.sql

  

查看資料資訊

mysql> select * from SYS_TABLES where name like ‘%tb%‘;+-------+----+--------+------+--------+---------+--------------+-------+| NAME  | ID | N_COLS | TYPE | MIX_ID | MIX_LEN | CLUSTER_NAME | SPACE |+-------+----+--------+------+--------+---------+--------------+-------+| ht/tb | 40 |      2 |   33 |      0 |      80 |              |    23 |+-------+----+--------+------+--------+---------+--------------+-------+1 row in set (0.00 sec)mysql> select * from SYS_INDEXES where table_id=40;+----------+----+---------+----------+------+-------+---------+| TABLE_ID | ID | NAME    | N_FIELDS | TYPE | SPACE | PAGE_NO |+----------+----+---------+----------+------+-------+---------+|       40 | 41 | PRIMARY |        1 |    3 |    23 |       3 |+----------+----+---------+----------+------+-------+---------+1 row in set (0.00 sec)

 

mysql產生資料字典

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.