From:       To:      

Home > Documentation > MySQL to PostgreSQL

Migrate MySQL to PostgreSQL

[MySQL to PostgreSQL Converter]  [How to Control Migration Results]  [Types Mapping]  [Converting Queries]

Why Migrate to PostgreSQL?

Both MySQL and PostgreSQL are popular open-source RDBMS enriched by wide range of administration and development tools. Both systems are ported on every popular OS and have large communities of experts. However, PostgreSQL provides multiple advantages that may be important for certain projects:

On the other hand, PostgreSQL is more complex than MySQL and it can be difficult for beginners. So, if you work on simple database project that is covered by MySQL capabilities and do not plan to scale it, there is no much sense to migrate it from MySQL to Postgres.

Migration Strategies

1. Manual Migration. The steps described below are required to migrate database from MySQL to PostgreSQL manually:

2. Migrate MySQL to PostgreSQL via Pgloader

Pgloader is a migration tool that facilitates the transfer of data from MySQL, SQLite and MS SQL Server to PostgreSQL. It is free and needs the following prerequisites:

As soon as you fulfill all these requirements, Pgloader can be installed from the Ubuntu APT repositories using the apt command. However, in order to use the useSSL option in v3.5.1 and later, it is necessary to install from the source code that can be obtained from the GitHub repository.

After the installation of Pgloader succeeds, the database migration procedure containing the following steps may be started:

3. Connect MySQL to PostgreSQL Using Foreign Data Wrapper.

This method is based on the PostgreSQL foreign data wrapper feature and includes the following steps.

4. Migrate Database from MySQL to PostgreSQL Using Commercial Tools.

For those who consider the tree previous migration methods too complicated, it is reasonable to use special commercial tools that can fully automate database migration procedure through intuitive graphical interface within just a few button clicks. One of these tools is MySQL to PostgreSQL converter developed by Intelligent Converters. It has all necessary features to handle large and complex database migration projects and does not require users to have deep technical skills to use it.

Have questions? Contact us