oracle
mysql

Migrate Oracle to MySQL

Certified — live-tested path

The converter maps 15 Oracle column types to MySQL. One of them changes kind on the way (DATE becomes datetime); the table below lists every one. DBShifts converts the schema, copies the rows in parallel batches and checks the result with row counts and checksums.

Start Oracle → MySQL Migration

Free tier · no credit card

Oracle vs MySQL

oracle

Oracle

Oracle Database, the long-standing enterprise standard.

mysql

MySQL

the world's most deployed open-source relational database.

Oracle to MySQL data type mapping

Pulled directly from DBShifts's own conversion rules — not a general reference table, this is what actually runs.

OracleMySQL
NUMBER(10)bigint
NUMBER(19)decimal(19,0)
NUMBER(10,2)decimal(10,2)
VARCHAR2(255)varchar(255)
NVARCHAR2(255)varchar(255)
CHAR(10)char(10)
CLOBlongtext
NCLOBlongtext
BLOBlongblob
DATEdatetime
TIMESTAMPdatetime
BINARY_FLOATfloat
BINARY_DOUBLEdouble
RAWLONGBLOB
LONGlongtext

Example: Oracle to MySQL schema conversion

Oracle

CREATE TABLE orders (
  id            NUMBER(10) GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
  customer_id   NUMBER(10) NOT NULL,
  total         NUMBER(10,2) NOT NULL,
  notes         CLOB,
  reference     VARCHAR2(255),
  placed_at     TIMESTAMP NOT NULL
);

MySQL

CREATE TABLE IF NOT EXISTS `orders` (
    `id` bigint NOT NULL AUTO_INCREMENT,
    `customer_id` bigint NOT NULL,
    `total` decimal(10,2) NOT NULL,
    `notes` longtext,
    `reference` varchar(255),
    `placed_at` datetime NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Oracle DATE is not MySQL DATE

Oracle's DATE type includes hours, minutes and seconds. MySQL's DATE is a calendar day and nothing more. Mapping the two by name discards the time component of every row, silently, and the row count still matches afterwards.

The correct target is DATETIME. This is the single most common data-loss bug on this route precisely because the type names are identical, so it survives a schema review that is reading names rather than semantics. If anything in the application computes durations, schedules or orderings within a day, the damage is immediate and not recoverable without re-migrating.

The empty string is NULL, and that changes query results

Oracle stores a zero-length string as NULL. MySQL treats '' and NULL as different values. Migrating in this direction is the benign direction — nothing is lost, because there were never any empty strings to preserve — but the application logic moving with it is not benign.

Code written against Oracle uses IS NULL to test for empty. Against MySQL that test now misses every row where the application later writes a genuine empty string, and a NOT NULL column in MySQL will happily accept '' where Oracle would have rejected it. The schema converts cleanly and the predicates stop meaning what they meant.

Identifier case, and what happens on Linux

Oracle folds unquoted identifiers to upper case, so a table created as orders is really ORDERS. MySQL's table names map to filenames, which makes them case-sensitive on Linux and case-insensitive on Windows and macOS. A schema converted with Oracle's upper-case names produces ORDERS on disk, and every query written as select * from orders fails on a Linux server while working on the developer's laptop.

DBShifts reconciles the casing during conversion rather than carrying Oracle's upper case through. It is worth knowing anyway, because it explains the class of bug where the same code works in development and fails in production with nothing but a case difference between them.

The other half of this route is procedural: packages, and package state, have no MySQL equivalent at all. Stored procedures convert; a package that holds session state between calls does not, and that logic has to move into the application.

Oracle → MySQL conversion notes

Engine-specific rules baked into the conversion and transfer pipeline — verified by live certification of this exact pair.

  • NUMBER columns are fetched as exact decimals (38 digits), not lossy floats.
  • Identifier case differences (Oracle uppercases unquoted names) are reconciled automatically during transfer.
  • Empty string = NULL semantics are accounted for in validation so comparisons stay honest.
  • 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 Oracle to MySQL migration production-ready in DBShifts?

Yes. Oracle to MySQL is a certified pair: it passes the live certification suite on real Oracle and MySQL servers, which checks schema fidelity, row counts, type-aware checksums and paging across batches.

What happens to Oracle types that MySQL doesn't have?

Each gets the nearest MySQL type the converter treats as safe: DATE becomes datetime. Every such decision is in the migration plan before anything runs, and any mapping can be overridden per column.

Can I keep Oracle and MySQL in sync after the initial migration?

Yes, until you cut over. DBShifts reads Flashback Version Query between SCNs, from an SCN captured before the first row is copied. A change has to still be in undo when it is read, so undo retention sets how long the stream can pause.

Which Oracle data types need a second look when moving to MySQL?

The table above carries a note on 4 of them: NUMBER(10) (bigint), CLOB (longtext), DATE (datetime), RAW (LONGBLOB). Analysis flags the same columns on your own schema before any data moves.

Go deeper

Ready to move Oracle to MySQL?

Set up in under two minutes. Validation and rollback included.

Start Free Migration