Skip to content

lichang98/mysql_ibd_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mysql_ibd_parser

For parsing indexes and records from .ibd file

Brief Introduction

Newer version mysql(v8.0+) saves data dictionary and records in one file while the older version ones save them separately into .frm, .MYD and .MYI. Mysql provides ibd2sdi, which can be used to extract dictionary info, but not contains records. The fields of one row are saved in binary, retriving single field is not possible without table info. Since SDI is stored in .ibd, we can use information in it to separate fields from binary.

Usage

Replace the path in Makefile with your own. The target table should use InnoDB engine, and using file-per-table mode. The program now only support table with column type int, char and varchar, you can modify codes from line 523 to 537 to support more types.

make

./main <path to .ibd file>

Sample

Table

image

Output

image

image

Acknowledgements

About

For parsing indexes and records from .ibd file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published