开发者

Importing records from PostgreSQL to MySQL

开发者 https://www.devze.com 2023-02-28 05:54 出处:网络
Was wondering if anyone had any insight or recommended tools for exporting the records from a PostgreSQL database and开发者_C百科 importing them into a MySQL database. I believe the table structure is

Was wondering if anyone had any insight or recommended tools for exporting the records from a PostgreSQL database and开发者_C百科 importing them into a MySQL database. I believe the table structure is 100% identical.

Thoughts? Thanks!


The command

pg_dump --data-only --column-inserts <database_name>  

will generate SQL-standard-compliant INSERT statements with all column names listed and one VALUES clause per INSERT. This is the most portable way of moving data from PostgreSQL to any other SQL database.


Check out SquirrelSQL, it can pump data from one database brand into another via the DBCopy plugin. When the table structures are really identical it works quite well.


There is a ruby app called Taps that will do it. I've used it before with great success:

http://adam.heroku.com/past/2009/2/11/taps_for_easy_database_transfers/

0

精彩评论

暂无评论...
验证码 换一张
取 消