将数据从PostgreSQL传输到MySQL

时间:2021-08-02 03:46:59

Hello is there any method to transfer the table layout and data from a Postgres database to MySQL automatic?

您好,是否有任何方法可以将表格布局和数据从Postgres数据库自动传输到MySQL?

I have to migrate the scheme anda data to MYSQL

我必须将方案和数据迁移到MYSQL

2 个解决方案

#1


5  

The easiest would probably be to export the database (schema & data) as SQL using Postgres' pg_dump utility, then import the resulting SQL file into MySql.

最简单的可能是使用Postgres的pg_dump实用程序将数据库(模式和数据)导出为SQL,然后将生成的SQL文件导入MySql。

It's possible that there will be some incompatibilities in the intermediate SQL, but you can almost assuredly take care of these with a find/replace in your favorite text editor.

中间SQL中可能存在一些不兼容性,但您可以通过您喜欢的文本编辑器中的查找/替换来确保这些不兼容。

#2


0  

It is possible to do using the "Data Transfer" feature of Navicat Premium. It will not preserve foreign keys though, but the data transfers correctly with the two databases incompatibility issues resolved.

可以使用Navicat Premium的“数据传输”功能。它不会保留外键,但数据传输正确,两个数据库不兼容问题已解决。

#1


5  

The easiest would probably be to export the database (schema & data) as SQL using Postgres' pg_dump utility, then import the resulting SQL file into MySql.

最简单的可能是使用Postgres的pg_dump实用程序将数据库(模式和数据)导出为SQL,然后将生成的SQL文件导入MySql。

It's possible that there will be some incompatibilities in the intermediate SQL, but you can almost assuredly take care of these with a find/replace in your favorite text editor.

中间SQL中可能存在一些不兼容性,但您可以通过您喜欢的文本编辑器中的查找/替换来确保这些不兼容。

#2


0  

It is possible to do using the "Data Transfer" feature of Navicat Premium. It will not preserve foreign keys though, but the data transfers correctly with the two databases incompatibility issues resolved.

可以使用Navicat Premium的“数据传输”功能。它不会保留外键,但数据传输正确,两个数据库不兼容问题已解决。