IBM DB2
MySQL

IBM DB2 to MySQL Converter

Move IBM DB2 data into MySQL, MariaDB, Percona Server, Amazon RDS, Aurora, Azure Database for MySQL, or Google Cloud SQL. Schema conversion, type mapping, and optional two-way sync.

DB2 to MySQL migration moves IBM DB2 data into a MySQL-family database, but DB2-specific schema and SQL behavior still need target decisions.

The row copy is only one part of the job. Generated keys, sequences, large object columns, numeric precision, character encodings, and SQL PL routines should be separated into table-migration and code-conversion work before MySQL becomes the write target.


What DBConvert does on this path: handles the DB2-to-MySQL move as a repeatable desktop workflow:

  • Connects to IBM DB2 and reads selected schemas, tables, fields, indexes, and data.
  • Maps DB2 field types into MySQL-compatible columns and lets the mapping be reviewed before transfer.
  • Writes to MySQL, MariaDB, Percona Server, Amazon RDS / Aurora MySQL, Azure Database for MySQL, or Google Cloud SQL for MySQL.

What it does not do: DBConvert does not rewrite DB2 applications, COBOL jobs, embedded SQL, or complex SQL PL business logic into a MySQL application layer. Treat procedures, triggers, functions, and application SQL as a code-conversion track alongside the schema and data migration.

Which DBConvert tool fits?

Use DBConvert for the planned DB2 to MySQL migration; use DBSync when both systems must keep changing during a staged rollout.

DBConvert for DB2 → MySQL

One-time migration with DB2 connection settings, schema and table selection, type-mapping review, data filters, saved sessions, and MySQL dump output when a DBA-controlled restore is preferred.

DBSync for DB2 ↔ MySQL

Repeat synchronization when DB2 must stay operational while MySQL is introduced. Use bidirectional sync only when table ownership and conflict-handling rules are clear; see database synchronization concepts for the underlying workflow.

Need more context? Compare DBConvert and DBSync side by side →

How DBConvert handles the DB2 → MySQL differences

DBConvert handles the table-level migration in the wizard: connection, schema selection, type mapping, transfer, and validation. SQL PL and application SQL remain a separate rewrite track.

Connection and schema

DBConvert connects through IBM Data Server Client libraries, then reads the selected DB2 schema: tables, fields, indexes, views, foreign keys, and rows.

Type mapping review

DBConvert exposes DB2-to-MySQL column mappings before the target tables are created, so precision, Unicode, LOB, and date-time decisions are explicit.

Keys and generated values

DB2 identity columns map to MySQL AUTO_INCREMENT. Shared DB2 sequences need a per-table policy or application code after the data load.

Validation after import

DBConvert compares source and target row counts after the load. Follow with key-range, nullable-column, LOB, and date-time spot checks.

Procedural code boundary

DBConvert migrates tables, views, and foreign keys. DB2 SQL PL procedures, functions, triggers, modules, and embedded application SQL are rewritten manually in MySQL's stored-procedure dialect.

Type mapping checkpoints

DB2 source type MySQL target type Migration note
DECIMAL(p,s), NUMERIC(p,s) DECIMAL(p,s) Keep declared precision and scale for finance columns.
DECFLOAT DECIMAL or DOUBLE Pick fixed or approximate precision per column.
GRAPHIC, VARGRAPHIC VARCHAR with utf8mb4 Use Unicode-compatible MySQL character sets.
CLOB, BLOB LONGTEXT, LONGBLOB Sample large rows after load; LOB columns expose driver and timeout issues first.
TIMESTAMP DATETIME(6) Keep fractional seconds where the application compares exact timestamps.
Identity columns AUTO_INCREMENT Reseed above the loaded maximum key value before writes resume.

Choosing the migration route

The right route depends on whether the project is schema-plus-data migration, SQL/code conversion, or a cloud migration program.

Route Best fit Boundary
DBConvert / DBSync Schema and data migration: DB2 connection, table selection, type mapping, filters, MySQL-family targets, saved sessions, and optional staged synchronization. Best when the main job is moving tables and keeping data repeatable; DB2 SQL PL and application SQL still require review.
SQL/code conversion tools DB2 DDL, SQL scripts, views, stored procedures, functions, triggers, or embedded SQL that must be translated into MySQL-compatible syntax. Useful for code rewrite work, but it is a different problem from copying live table data, saving repeatable jobs, or keeping DB2 and MySQL synchronized.
AWS SCT + AWS DMS AWS-centered migrations where Db2 for LUW moves to Amazon RDS for MySQL or Aurora MySQL, especially when full-load plus change replication is part of the cutover plan. Cloud service workflow, not a local desktop converter for every MySQL target; DB2 routines and application code still need manual conversion when the tool cannot translate them.

Supported versions

  • IBM DB2 v9.7 and later
  • MySQL 5.x, 8.x; MariaDB; Percona Server
  • Amazon RDS / Aurora MySQL, Azure Database for MySQL, Google Cloud SQL

Supported in this path

Source IBM DB2
Target MySQL
IBM DB2 MySQL MariaDB Percona Server for MySQL Amazon RDS for MySQL Amazon Aurora MySQL Azure Database for MySQL Google Cloud SQL for MySQL

Using IBM DB2 to MySQL Tools

When launching the DBConvert or DBSync application in GUI mode, it guides you through the steps to start database migration or synchronization:

1

Connect to IBM DB2 source database

Specify the username/password and host/port parameters if your source database requires login credentials.

Connect to IBM DB2 source database from DBConvert

DB2 source

Use the server connection form and provide the DB2 schema when the source has multiple schemas. If connection fails, check the DB2 client guide.

2

Connect to MySQL destination database

Specify parameters for the destination database similar to the source, defining connection settings and username/password pairs.

Connect to MySQL target database from DBConvert

MySQL target

Follow the MySQL connection guide for MySQL, MariaDB / Percona, RDS / Aurora, or Google Cloud SQL.

Next steps: configure, validate, run

After connecting source and target, the remaining steps are the same for every database pair:

  • Configure migration options - pick tables, fields, indices, views.
  • Issue detection - the built-in checker flags integrity problems before migration starts.
  • Execute - commit the job, monitor progress, save the session for reuse.
  • Schedule and CLI - rerun saved sessions on a schedule or from the command line.
Open the full guide

Steps 3-5, software features, command-line mode, scheduler, and system requirements.

See all features