Skip to content

dveeden/mariadb2tidb

 
 

mariadb2tidb CI

A command-line tool that converts MariaDB schemas into TiDB-compatible SQL.

Features

  • Schema transformation to TiDB dialect
  • Database extraction from multi-DB dumps
  • Parallel import to TiDB
  • Validation and diff generation

Installation

Requires Go 1.24+.

Quick install (latest):

go install github.com/developer-Bushido/mariadb2tidb/cmd/mariadb2tidb@latest

From source:

git clone https://github.com/developer-Bushido/mariadb2tidb.git
cd mariadb2tidb
make build
./bin/mariadb2tidb version

Usage

Transform a MariaDB schema:

mariadb2tidb transform schema.sql -o schema_tidb.sql

You can also define default input and output directories in a YAML config file:

input_dir: ./DUMPLING
output_dir: ./LIGHTNING

Run commands with --config to read these paths.

See mariadb2tidb --help for all commands.

Configuration file

Minimal config/default.yaml example:

input_dir: ./DUMPLING
output_dir: ./LIGHTNING
enabled_rules: []
disabled_rules: []
strict_mode: true

Documentation

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Development

  • 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

License

mariadb2tidb is licensed under the Apache 2.0 license.

Code of Conduct

This project follows a Code of Conduct. Please read it to understand the expected behavior.

Security

If you discover a security vulnerability, please follow our Security Policy and report it privately via GitHub Security Advisories.

About

MariaDB → TiDB schema transformer (Go)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.1%
  • Makefile 0.9%