A command-line tool that converts MariaDB schemas into TiDB-compatible SQL.
- Schema transformation to TiDB dialect
- Database extraction from multi-DB dumps
- Parallel import to TiDB
- Validation and diff generation
Requires Go 1.24+.
Quick install (latest):
go install github.com/developer-Bushido/mariadb2tidb/cmd/mariadb2tidb@latestFrom source:
git clone https://github.com/developer-Bushido/mariadb2tidb.git
cd mariadb2tidb
make build
./bin/mariadb2tidb versionTransform a MariaDB schema:
mariadb2tidb transform schema.sql -o schema_tidb.sqlYou can also define default input and output directories in a YAML config file:
input_dir: ./DUMPLING
output_dir: ./LIGHTNINGRun commands with --config to read these paths.
See mariadb2tidb --help for all commands.
Minimal config/default.yaml example:
input_dir: ./DUMPLING
output_dir: ./LIGHTNING
enabled_rules: []
disabled_rules: []
strict_mode: trueContributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Requirements: Go 1.24+.
- Format/Vet/Test:
make fmt vet test - Lint (via golangci-lint):
golangci-lint run
- Build with version metadata:
make build # uses git tag/commit and date via ldflags
mariadb2tidb is licensed under the Apache 2.0 license.
This project follows a Code of Conduct. Please read it to understand the expected behavior.
If you discover a security vulnerability, please follow our Security Policy and report it privately via GitHub Security Advisories.