Migrate MariaDB to MySQL
Certified — live-tested pathThe converter maps 20 MariaDB column types to MySQL. Each lands in the same kind of MySQL type; the table below shows the exact spelling and any limit that differs. DBShifts converts the schema, copies the rows in parallel batches and checks the result with row counts and checksums.
Free tier · no credit card
MariaDB vs MySQL
MariaDB
the community-driven MySQL fork.
MySQL
the world's most deployed open-source relational database.
MariaDB to MySQL data type mapping
Pulled directly from DBShifts's own conversion rules — not a general reference table, this is what actually runs.
| MariaDB | MySQL |
|---|---|
| INT | int |
| BIGINT | bigint |
| SMALLINT | smallint |
| TINYINT(1) | tinyint(1) |
| DECIMAL(10,2) | decimal(10,2) |
| FLOAT | float |
| DOUBLE | double |
| VARCHAR(255) | varchar(255) |
| TEXT | text |
| LONGTEXT | longtext |
| CHAR(10) | char(10) |
| DATE | date |
| DATETIME | datetime |
| TIMESTAMP | timestamp |
| TIME | time |
| YEAR | year |
| BLOB | blob |
| JSON | json |
| ENUM('a','b') | enum('a','b') |
| SET('a','b') | set('a','b') |
Example: MariaDB to MySQL schema conversion
MariaDB
CREATE TABLE orders (
id INT AUTO_INCREMENT PRIMARY KEY,
customer_id INT NOT NULL,
status ENUM('new','paid','shipped') NOT NULL DEFAULT 'new',
total DECIMAL(10,2) NOT NULL,
is_gift TINYINT(1) NOT NULL DEFAULT 0,
notes TEXT,
metadata JSON,
placed_at DATETIME NOT NULL
);MySQL
CREATE TABLE IF NOT EXISTS `orders` (
`id` int NOT NULL AUTO_INCREMENT,
`customer_id` int NOT NULL,
`status` enum('new','paid','shipped') NOT NULL DEFAULT 'new',
`total` decimal(10,2) NOT NULL,
`is_gift` tinyint(1) NOT NULL DEFAULT 0,
`notes` text,
`metadata` json,
`placed_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;JSON stored as text becomes binary JSON
MariaDB keeps JSON as text. MySQL parses it into a binary format, and in doing so it normalises: whitespace goes, object keys are reordered, and a key that appears twice keeps one value. Every document means the same thing after the move, but very few are byte-for-byte what they were.
That matters to anything comparing raw text: a checksum computed by the application, a cache keyed on the serialised document, a test fixture asserting on output. It also catches invalid documents, because MySQL refuses to store one, where MariaDB's json_valid() check is a constraint that may never have been there on older tables.
Find the MariaDB-only objects first
MariaDB has features MySQL never added: sequences created with CREATE SEQUENCE, system-versioned tables that keep every past row, and the UUID and INET6 column types. None of them has a MySQL equivalent to convert into.
List them before planning anything: SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'app' AND TABLE_TYPE IN ('SEQUENCE', 'SYSTEM VERSIONED'). A versioned table moves as its current rows only; its history needs exporting separately if anyone will ask for it.
MariaDB → MySQL conversion notes
Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.
- MariaDB's JSON columns (LONGTEXT + json_valid CHECK) are detected and mapped to real JSON types on targets that have them.
- Engine-specific CHECK constraints like json_valid() are filtered on targets that don't support them — data still migrates.
- Display-width unsigned types (bigint(20) unsigned) are recognized and widened correctly.
- AUTO_INCREMENT counters are reseeded to MAX(id)+1 after bulk load, so the first production insert doesn't collide.
- Oversized VARCHAR definitions from other engines are rewritten to TEXT/LONGTEXT to respect MySQL's row-size limits.
- Foreign keys are applied after data load with FOREIGN_KEY_CHECKS deferred for speed and ordering safety.
Frequently asked questions
Is MariaDB to MySQL migration production-ready in DBShifts?
Yes. MariaDB to MySQL is a certified pair: it passes the live certification suite on real MariaDB and MySQL servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.
What happens to MariaDB types that MySQL doesn't have?
None of the common ones are missing: every type in the table lands in the same kind of MySQL type. What still differs is limits and defaults, which the notes beside each row cover.
Can I keep MariaDB and MySQL in sync after the initial migration?
Yes, until you cut over. DBShifts reads the row-based binary log (binlog_format = ROW). With zero-downtime mode on, the log position is captured before the first row is copied, so writes made during the copy are replayed afterwards.
Which MariaDB data types need a second look when moving to MySQL?
The table above carries a note on 6 of them: TINYINT(1) (tinyint(1)), FLOAT (float), DOUBLE (double), TIMESTAMP (timestamp) and more. Analysis flags the same columns on your own schema before any data moves.
Go deeper
How We Live-Certified All 49 Migration Paths
The certification harness behind this page's claims.
What Is Database Migration? A Plain-English Guide
What a migration involves, and why it is harder than copying files.
Reference
Compared with other tools
Errors you may hit
Ready to move MariaDB to MySQL?
Set up in under two minutes. Validation and rollback included.
Start Free Migration