From:       To:      
Home > Documentation > MySQL to PostgreSQL

Synchronization

MySQL to PostgreSQL converter implements synchronization as insert of MySQL records that are not exist in PostgreSQL table and update of existing PostgreSQL rows with MySQL data. Synchronization requires both source and destination tables have identical structures and primary key or unique index is defined.

Assume both MySQL and PostgreSQL databases have table "People" defined as below:

    Table1(
        ID Integer NOT NULL, 
        FName Varchar(50),
        LName Varchar(50), 
        EMail Varchar(50), 
        Primary Key (ID)
    );

This table has the following contents in MySQL database:

2  Andrew  White a.white@corporation.com
3  Phil  Johnson p.johnson@gmail.com

In PostgreSQL database:

1  John  Smith j.smith@msn.com
2  Andew  White a.white@yahoo.com

After migrating MySQL data to PostgreSQL in "Synchronize" mode MySQL table is kept untouched and PostgreSQL table is modified as (pay attention to the cell marked red):

1  John  Smith j.smith@msn.com
2  Andew  White a.white@corporation.com
3  Phil  Johnson p.johnson@gmail.com