ibd2sql is tool of transform mysql ibd file to sql(data). It can parse IBD files into SQL statements. ibd2sql written with Python is commonly used to learn IBD files and data recovery.
Simple and useful !
Security: as long as the file has read permission.
Comprehensiveness: all column types in mysql 5.x or 8.x or 9.x
Simple: using Python to write packages without third-party dependencies.
Useful: parse data with mark of deleted (--delete).
v1.5 url : https://github.com/ddcw/ibd2sql/archive/refs/tags/v1.5.tar.gz
Linux
wget https://github.com/ddcw/ibd2sql/archive/refs/heads/main.zip
unzip main.zip
cd ibd2sql-main
Windows
click https://github.com/ddcw/ibd2sql/archive/refs/heads/main.zip to download
Linux
python3 main.py /PATH/your_dir/xxxx.ibd --sql --ddl
# or use redirection to save data
python3 main.py /PATH/your_dir/xxxx.ibd --sql --ddl > xxx.sql
Windows
Python3 is called Python on Windows
Path usage '\' instead of '/'
python main.py F:\t20240627\test\ddcw_char_ascii.ibd --sql --ddl
more usage: docs/USAGE.md
env linux:
# suggestion cp file to anothor OS/FS
SHELL> cp -ra /data/mysql_3314/mysqldata/db1/test_ibd2sql.ibd /tmp
SHELL> python3 main.py /tmp/test_ibd2sql.ibd --ddl --sql
CREATE TABLE IF NOT EXISTS `db1`.`test_ibd2sql`(
`id` int NULL,
`name` varchar(127) NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ;
INSERT INTO `db1`.`test_ibd2sql` VALUES (1, 'ddcw');
INSERT INTO `db1`.`test_ibd2sql` VALUES (2, 'ibd2sql v1.5');
more example: docs/ALLTEST.md
VERSION | UPDATE | NOTE |
---|---|---|
v0.1 | 2023.4.27 | first version |
v0.2 | 2023.08.30 | support more data types |
v0.3 | 2023.10.13 | support parse file from 5.x upgrade to 8.x |
v1.0 | 2024.01.05 | add debug and support more data types |
v1.1 | 2024.04.12 | fix some bugs |
v1.2 | 2024.04.25 | add support of geometry data types |
v1.3 | 2024.05.11 | add support 5.x |
v1.4 | 2024.05.21 | add support extra page and subpartition |
v1.5 | 2024.07.10 | add support vector data types and fix INSTANT bug |
detail: docs/CHANGELOG.md
require: python3
support range: mysql5.x 8.x 9.x