mariadb2tidb

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2025 License: Apache-2.0

README

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.

Directories

Path Synopsis
cmd
mariadb2tidb command
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL