Request an exact quote
Databases migration path

From Oracle Database to MySQL

When MySQL (not PostgreSQL) is the right Oracle exit, the workload fit, PL/SQL-to-stored-procedure conversion, tooling, and the ownership caveat.

Effort
High
Est. timeline
~18 wks
MySQL model
Free CE / paid editions
Open source
Yes
▶ Model your savings in the interactive calculator

Most Oracle migrations head to PostgreSQL, but for web-scale, read-heavy, or LAMP-style applications MySQL is often the better-fitting open-source target: simpler to operate, ubiquitous in the application ecosystem, and lighter for straightforward transactional workloads. This guide is about choosing MySQL deliberately for the workloads it suits, and knowing where PostgreSQL would serve you better.

When MySQL is the right call

MySQL shines for high-volume, relatively simple OLTP and applications already built around the MySQL ecosystem (CMS, e-commerce, many SaaS backends). It’s weaker than PostgreSQL for complex analytical SQL, advanced datatypes, rich procedural logic, and strict standards compliance, if your Oracle estate leans on heavy PL/SQL, materialized views, or analytic functions, PostgreSQL is the safer landing. Pick MySQL for app simplicity and ecosystem fit, not for replicating Oracle’s advanced engine.

The ownership caveat worth naming

MySQL Community Edition is open source but owned by Oracle. If the point of leaving is escaping Oracle entirely, consider MariaDB (a community fork, near-drop-in) instead, same migration mechanics, no Oracle stewardship. We cover that path separately; the conversion work below applies to both.

What converts, and what doesn’t

  • PL/SQL → MySQL stored procedures/functions/triggers. MySQL’s procedural language is less capable than Oracle’s; complex packages need redesign, sometimes pushed into the application tier.
  • Datatypes. Oracle NUMBERDECIMAL/INT, DATE/TIMESTAMP differences, VARCHAR2VARCHAR, CLOB/BLOB mapping; mind MySQL’s stricter/again-configurable SQL modes.
  • Sequences → AUTO_INCREMENT (or MySQL 8 sequences via tables); ROWNUM patterns rewritten as LIMIT.
  • Application SQL. Oracle hints, (+) outer joins, DUAL, and PL/SQL called from the app must be rewritten, usually the biggest hidden cost.

Tooling

AWS Schema Conversion Tool (SCT) assesses and converts schema and code to MySQL, flagging manual items; ora2pg can also target MySQL-style output. For data + low-downtime cutover, AWS DMS does a full load plus CDC replication until you switch over.

Start with the SCT assessment report and use it to confirm the fit decision, not just to plan the work: if the report shows a large share of complex PL/SQL that will not convert cleanly, that is a signal MySQL’s lighter procedural model may cost you more in redesign than PostgreSQL would. DMS maps Oracle types to MySQL types during the load, but review the mappings rather than trusting them blindly, especially around NUMBER precision and date/time columns.

Oracle behaviors to handle by hand

Several Oracle behaviors need deliberate handling on MySQL:

  • NUMBER precision. Oracle NUMBER without precision is arbitrary; map it to DECIMAL where exactness matters and to an integer type only where you have confirmed the domain, or you will silently round or overflow.
  • DATE carries time. Oracle DATE includes a time component, so map it to MySQL DATETIME rather than DATE unless the column is genuinely date-only.
  • Empty string versus NULL. Oracle treats '' as NULL; MySQL stores a zero-length string. Normalize on load so IS NULL checks and constraints keep behaving as the application expects.
  • SQL modes. MySQL’s behavior around zero dates, string truncation, and division depends on the active SQL mode. Set a strict mode explicitly and test, rather than inheriting whatever the server defaults to.

Application SQL changes

The application SQL is usually the largest hidden cost. Oracle idioms such as SELECT ... FROM DUAL, the (+) outer-join operator, optimizer hints, NVL, DECODE, and SYSDATE all have MySQL equivalents (NOW(), IFNULL/COALESCE, CASE), but each has to be found and rewritten across embedded queries, ORM mappings, reporting tools, and ETL. ROWNUM filtering becomes LIMIT. Inventory every place SQL is written and grep for the Oracle-specific constructs early, because these are exactly the queries that pass in Oracle and fail or return different results on MySQL.

The order to work in

  1. Assess with SCT; triage objects and confirm MySQL is the right fit versus PostgreSQL.
  2. Provision MySQL (primary + replicas), sized on vCPU, tuned (InnoDB buffer pool, etc.).
  3. Convert schema, review action items, load into MySQL.
  4. Migrate data with DMS full-load + CDC.
  5. Convert procedures and application SQL in parallel.
  6. Validate with row counts, data-diffs, an app regression suite, and performance comparison against the Oracle baseline.
  7. Cut over in a window: quiesce writes, drain CDC, final diff, repoint connections, smoke-test, keep Oracle recoverable.

Earning trust in the new engine

The parallel-run phase is what earns trust in the new engine, and it is the step most often compressed under deadline pressure. Once DMS full-load plus CDC has MySQL tracking Oracle with low lag, point a copy of the application or a slice of read traffic at MySQL and diff results against Oracle over a representative period, including any month-end or batch cycles rather than a quiet afternoon. Compare row counts and checksums, run the application regression suite, and compare query latency against the Oracle baseline so a plan regression shows up before users do. Because MySQL’s procedural model is lighter than Oracle’s, this is also where you confirm that logic you pushed into the application tier still behaves correctly under load. Promote only when documented acceptance criteria for correctness and performance are met, then cut over in a window: quiesce writes, drain CDC to zero, run a final diff, repoint connections, smoke-test, and keep Oracle recoverable through hypercare so rollback is a repoint rather than a restore.

When MySQL is the answer

Oracle → MySQL is a strong, low-cost exit for simpler, high-volume transactional and web workloads; for complex procedural or analytical Oracle estates, prefer PostgreSQL. Watch the Oracle-ownership point (MariaDB if that matters), and budget for PL/SQL and application-SQL rewrites, the data movement is the easy part. Model the per-vCPU savings in the calculator above, and treat the figures as illustrative until you validate fit and performance against your workload.

Tooling & automation for this path

AWS SCT or ora2pg; review datatype mappings; convert stored procedures.

Primary references: official MySQL documentation ↗ and the Oracle Database documentation ↗ , always verify version-specific behavior against them before you migrate.

Frequently asked questions

Why would I pick MySQL over PostgreSQL when leaving Oracle?

MySQL fits high-volume, relatively simple OLTP and applications already built around the MySQL ecosystem, such as CMS, e-commerce, and many SaaS backends, where it is lighter to operate. PostgreSQL is the safer landing when the Oracle estate leans on heavy PL/SQL, materialized views, advanced datatypes, or complex analytical SQL. Choose MySQL for application and ecosystem fit, not to replicate Oracle's advanced engine.

How does Oracle PL/SQL map to MySQL stored procedures?

MySQL has stored procedures, functions, and triggers, but its procedural language is less capable than Oracle's PL/SQL and has no package construct. Simple procedures convert with edits, while packages, autonomous transactions, and rich exception handling often have to be redesigned, and some logic is better pushed into the application tier. Treat the stored-program rewrite as the main effort, not the data movement.

What replaces Oracle sequences in MySQL?

The common target is an AUTO_INCREMENT column, and the Oracle sequence-plus-trigger pattern usually collapses into that. Where you genuinely need multiple independent sequences you emulate them with a dedicated table. Either way, reset the AUTO_INCREMENT high-water mark after the bulk load so the first new insert does not collide with migrated keys.

Since Oracle owns MySQL, should I use MariaDB instead?

If the point of leaving is escaping Oracle stewardship entirely, MariaDB is a near-drop-in community fork with essentially the same migration mechanics, so the conversion work in this guide applies to both. If Oracle ownership of the open-source engine is not a concern for you, MySQL Community Edition is fine. Decide based on your procurement and governance stance, not on technical migration cost, which is similar.

Model your 3-year cost

Pre-filled for Oracle Database → MySQL; adjust every figure with your own numbers. Estimates are illustrative, not vendor quotes, see our methodology.

Sized at 64 vCPUs, cost is computed on this.
Stay on Oracle Database (3yr)
$326,400
Move to MySQL (3yr + migration)
$76,800
Projected savings
$249,600 (76%)
Payback period
8.1 mo
Build a decision report from these numbers:

How this is licensed: Oracle and SQL Server license by the vCPUs of the database server VM. Oracle applies a per-core factor and counts ALL vCPUs unless the workload runs on approved hard-partitioned or Oracle-engineered hardware; SQL Server has a 4-vCPU-per-VM minimum. Set $/vCPU to your edition and core factor.

Illustrative, editable figures, not vendor pricing (defaults reviewed May 2026).

Request a vendor-accurate MySQL quote

A guided builder that turns your estimates into a requirements report (RFQ) you can send to a vendor, partner, or distributor for a binding quote, then feed the real prices back into the calculator above. How our estimates work.

  1. 1Size it
  2. 2Requirements
  3. 3Your details
  4. 4Channels & export

How big is your Oracle Database estate?

Count the OS/database server VMs and their typical vCPU allocation. Licensing usually counts all vCPUs on each VM. Not sure? Enter rough numbers, the distributor confirms exact counts later.

64 vCPUs
Default mid-size assumption (64 vCPUs)