Developer beta 0.1.0-beta.1 documentation. The build is not available for download yet; these pages describe the beta as built and tested on Linux x86-64.
Migration from MySQL
holadb migrate mysql://user:password@host:3306/dbname ./dest [--lossy] [--only a,b] [--batch 5000] [--no-resume] [--json]
The built-in MySQL client speaks the MySQL protocol (v10 handshake,
mysql_native_password and the caching_sha2_password fast path) and
streams SELECT results in the text protocol; MariaDB works the same. The
schema comes from information_schema. The pipeline, the report, the
resume behaviour and the rules are the same as for
PostgreSQL: exact and lossless mappings
migrate, lossy ones need --lossy, unsupported types refuse the table,
every index is recreated, and counts plus checksums are verified.
Type mapping
| MySQL | HolaDB | Kind | Note |
|---|---|---|---|
| bool, boolean | BOOLEAN | exact | |
| tinyint(1) | BOOLEAN | lossless | |
| tinyint / tinyint unsigned | TINYINT / UTINYINT | exact | |
| smallint / unsigned | SMALLINT / USMALLINT | exact | |
| mediumint, int, integer / unsigned | INTEGER / UINTEGER | exact | |
| bigint / unsigned | BIGINT / UBIGINT | exact | |
| float | REAL | exact | |
| double, real | DOUBLE PRECISION | exact | |
| char, varchar, tinytext, text, mediumtext, longtext | TEXT | lossless | length limit not enforced |
| binary, varbinary, tinyblob, blob, mediumblob, longblob | BYTEA | exact | |
| datetime, timestamp | TIMESTAMP | exact | |
| date | TIMESTAMP | lossless | midnight UTC |
| year | SMALLINT | lossless | |
| json | JSON | exact | |
| decimal, numeric | DOUBLE PRECISION | lossy | precision loss; needs --lossy |
| time, enum, set, bit | TEXT | lossy | kept as text |
| anything else (spatial, …) | — | unsupported | the table is refused |
Foreign keys, CHECK constraints, AUTO_INCREMENT counters, views,
triggers and stored routines are reported as not migrated. Unique keys
become unique indexes; the primary key becomes the HolaDB primary key.
If no MySQL server is reachable, the migration reports the connection error and exits 1; nothing is created.