Migrate MySQL to MariaDB
Certified — live-tested pathThe converter maps 20 MySQL column types to MariaDB. Each lands in the same kind of MariaDB 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
Not ready to connect a database? Paste your CREATE TABLE statements and see the MariaDB schema now
MySQL vs MariaDB
MySQL
the world's most deployed open-source relational database.
MariaDB
the community-driven MySQL fork.
MySQL to MariaDB data type mapping
Pulled directly from DBShifts's own conversion rules — not a general reference table, this is what actually runs.
| MySQL | MariaDB |
|---|---|
| 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: MySQL to MariaDB schema conversion
MySQL
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
);MariaDB
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;MySQL's JSON operators do not exist in MariaDB
The column comes across as json and holds the same documents, but MariaDB's json is LONGTEXT with a json_valid() check, not MySQL's binary format. MySQL's -> and ->> path operators are not implemented in MariaDB, so col->>'$.name' has to become JSON_UNQUOTE(JSON_EXTRACT(col, '$.name')), or JSON_VALUE(col, '$.name').
MySQL 8's multi-valued indexes over JSON arrays have no MariaDB counterpart either. Queries that relied on one keep working and get slower, which is the kind of change that shows up in production latency rather than in a test run.
The tables take MariaDB's default collation
The converted tables declare DEFAULT CHARSET=utf8mb4 and no collation, as the worked example shows, so they get whatever the MariaDB server defaults to rather than MySQL 8's utf8mb4_0900_ai_ci. The two disagree on how some accented and Asian characters sort and compare.
Two symptoms follow. ORDER BY on names can come back in a slightly different order, and a unique index that held two values in MySQL can reject the second in MariaDB if the new collation considers them equal. Set the collation explicitly on the server or the tables if either would matter.
MySQL → MariaDB conversion notes
Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.
- TINYINT(1) is treated as a boolean; plain TINYINT stays numeric — converting both blindly corrupts ratings and counters.
- UNSIGNED integers are widened on targets without unsigned types, so values above the signed range survive.
- ENUM and SET columns are converted with their value lists preserved (native enums, CHECK constraints, or arrays depending on the target).
- TIME columns are durations (-838h..838h) at the driver level — DBShifts converts them per target instead of failing the batch.
- Zero dates (0000-00-00) are normalized deterministically and reported, never silently dropped.
- Literal 'NULL' defaults reported by MariaDB's information schema are cleaned instead of becoming DEFAULT 'NULL' strings.
- AUTO_INCREMENT reseed after bulk load, same as MySQL.
Frequently asked questions
Is MySQL to MariaDB migration production-ready in DBShifts?
Yes. MySQL to MariaDB is a certified pair: it passes the live certification suite on real MySQL and MariaDB servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.
What happens to MySQL types that MariaDB doesn't have?
None of the common ones are missing: every type in the table lands in the same kind of MariaDB type. What still differs is limits and defaults, which the notes beside each row cover.
Can I keep MySQL and MariaDB 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 MySQL data types need a second look when moving to MariaDB?
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
- Getting started
- Running a migration, step by step
- Full type-mapping reference
- All supported pairs and their tiers
- Known limitations
- Understanding data-loss warnings
- Going live with cutover
- Watching for drift after cutover
- Run this migration from CI/CD
- Rewrite MySQL queries for MariaDB
- Convert your MySQL CREATE TABLE statements to MariaDB
Compared with other tools
Errors you may hit
Ready to move MySQL to MariaDB?
Set up in under two minutes. Validation and rollback included.
Start Free Migration