Giter VIP home page Giter VIP logo

ibd2sql's Introduction

INTRODUCE

中文版介绍

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.

FEATURE

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).

DOWNLOAD & USAGE

v1.5 url : https://github.com/ddcw/ibd2sql/archive/refs/tags/v1.5.tar.gz

download

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

usage

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

Example

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

CHANGE LOG

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 & SUPPORT

require: python3

support range: mysql5.x 8.x 9.x

ibd2sql's People

Contributors

ddcw avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.