Home > OS >  Migrate from mysql to postgre in Google Cloud SQL
Migrate from mysql to postgre in Google Cloud SQL

Time:05-27

Does anyone know how to migrate from mysql db to postgre db in Google Cloud SQL ?

I tried browsing the web put I can't really find any instructions how to accomplish this

The Data Migration service only enables you to upgrade major version within same db but not to switch to different db

CodePudding user response:

According to the documentation, DMS currently supports only homogeneous database migration 1 here’s a link for best practices 2.

There are currently no other Google Cloud tools to do the MySQL to PostgreSQL migration as you are looking for.

Nevertheless, in order to do the MySQL to PostgreSQL migration, a conversion would be necessary as the Databases are not entirely similar.

There is a possible workaround in stackoverflow link that shares multiple solutions to do a conversion, please keep in mind that the information is supported by the community meaning Google Cloud Platform cannot vouch for it.

With the aforementioned, you have two options in order to do the migration. In the first one, you would need to follow the next steps:

1.- Do an export of your data in a specific format (dump file or csv) as the documentation mentions 4.

2.- Do the conversion of the data in order to have the right format (Postgresql) 3.

3.- Do the import of the data as the documentation mentions 5.

On the other hand, the second solution could be using the 3rd party tool “pgloader” 6,7 that may help you with the migration.

  • Related