Step-by-step process to convert Oracle schemas, data, and code to MySQL with minimal downtime.
Lower licensing costs, open-source flexibility, and easier cloud hosting often push teams to migrate from Oracle to MySQL.
List object counts (tables, views, procedures), Oracle-specific data types (NUMBER, DATE, CLOB), and PL/SQL code you rely on. Assess size and allowable downtime.
Oracle SQL Developer (free), MySQL Workbench Migration Wizard, and AWS SCT handle schema conversion and data copy.For simple loads, use CSV + LOAD DATA INFILE.
Export DDL from Oracle with DBMS_METADATA, feed it into MySQL Workbench, and let the wizard map data types.Manually tweak outliers like NUMBER(*,*) to DECIMAL or AUTO_INCREMENT.
For each table, export to CSV: SET COLSEP ','; SPOOL customers.csv; SELECT * FROM customers; SPOOL OFF;
then bulk-load into MySQL: LOAD DATA INFILE 'customers.csv' INTO TABLE Customers FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"';
Enable Oracle GoldenGate or AWS DMS for change data capture.Replicate until your MySQL replica is current, then switch application connections.
Run row counts, checksums, and business queries in both systems. Example: SELECT COUNT(*) FROM Customers WHERE created_at >= '2024-01-01';
.
Iterate: schema first, small data slice, full data, code port, dual-write, final cut-over.Automate conversions with scripts and keep rollback plans.
Ignoring case-sensitive identifiers, forgetting to convert sequences to AUTO_INCREMENT, and assuming PL/SQL packages will run unchanged in MySQL.
.
PL/SQL isn’t compatible with MySQL. Rewrite logic in MySQL stored procedures or move it into application code.
Workbench converts basic triggers and foreign keys, but complex triggers with Oracle-specific syntax need manual rewrites.
Small databases (<10 GB) migrate in hours; larger systems depend on data volume, network speed, and validation time. Plan buffer time for fixes.