1

I have a table in a postgreSQL database that I would like to convert into a MySQL table. What would be the easiest way to do this? Any tools to do this? Remember, I am not converting the whole database to MySQL... I am just taking a table from that postgreSQL and convert it to MySQL table

aherlambang
  • 14,290
  • 50
  • 150
  • 253
  • Related: PostgreSQL's dblink functionality & MySQL's - see: http://stackoverflow.com/questions/1185742/mysql-equivalent-of-postgresqls-dblink-module – OMG Ponies Feb 25 '11 at 00:38

2 Answers2

1

You can use pg_dump to create a SQL dump from a single table and use this dump as input for mysql. Take a look at the option --data-only when you already have the tablestructure in your MySQL database and --column-inserts to create straight forward INSERT statements.

Frank Heikens
  • 117,544
  • 24
  • 142
  • 135
0

An ETL tool like SSIS, Pentaho, Talend or several others will do the trick. Most support a wide variety of data sources and destinations.

Marc Bernier
  • 2,928
  • 27
  • 45