Documentation

Everything you need to get started with MTPDB, from installation to advanced configuration.

Quick Start Guide

1. Download and Install

# Download the latest binary
curl -L https://releases.mtpdb.com/latest/mtpdb-linux-amd64.tar.gz | tar xz
cd mtpdb && ./mtpdb --help

2. Start the Server

# Start with default configuration
./mtpdb --config config.yaml

3. Connect Your Application

# Using MySQL client
mysql -h localhost -P 3306 -u root
# Using our SDK
npm install @mtpdb/sdk

Architecture Overview

MTPDB unifies your data stack into a single, high-performance engine that handles caching, storage, and connection management simultaneously.

Connection Manager

Multiplexes up to 500k concurrent connections with intelligent routing

Hot Cache Layer

In-memory caching with automatic hot-spot detection

Storage Engine

LSM-tree based persistence with tenant isolation

Configuration

# Example configuration file
server:
host: "0.0.0.0"
port: 3306
max_connections: 500000
storage:
data_dir: "/var/lib/mtpdb"
max_size: "1TB"
cache:
size: "8GB"
ttl: "3600s"

Key Configuration Options

  • max_connections: Maximum concurrent connections (default: 100k)
  • cache.size: In-memory cache size (default: 4GB)
  • storage.max_size: Maximum storage capacity
  • tenant.isolation: Enable schema-per-tenant isolation

Migrating from MySQL

Compatibility Mode

MTPDB supports MySQL 8.0 wire protocol compatibility, allowing you to keep your existing ORMs and applications.

# Your existing connection string works
mysql://user:pass@mtpdb-host:3306/database

Schema Migration

# Export from MySQL
mysqldump -u root -p database > schema.sql
# Import to MTPDB
mysql -h mtpdb-host -P 3306 -u root database < schema.sql