Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when trying to migrate postgresql db to mysql with workbench

I am trying to migrate a postgresql database to mysql following this tutorial: http://mysqlworkbench.org/2012/11/how-to-migrate-postgresql-databases-to-mysql-using-the-mysql-workbench-migration-wizard/

I am experiencing this error when I try to test my connection

Could not connect to Source DBMS [IM002][Microsoft][ODBC Driver Manager] Data soure name not found and no default driver specified (0)(SQLDriverConnect)

ODBC connection string

Driver=psqlodc;SERVER=127.0.0.1;PORT=5432;DATA...

Does anyone know how to correct this error?

like image 944
Brooks Fiala Avatar asked Oct 05 '14 03:10

Brooks Fiala


People also ask

Is MySQL workbench compatible with PostgreSQL?

With access to live PostgreSQL data from MySQL Workbench, you can easily query and update PostgreSQL, just like you would a MySQL database.

Can we convert PostgreSQL to MySQL?

MySQL :: How-To: Migrate PostgreSQL databases to MySQL using the MySQL Workbench Migration Wizard. MySQL Workbench 5.2. 41 introduced the new Migration Wizard module. This module allows you to easily and quickly migrate databases from various RDBMS products to MySQL.


2 Answers

I followed the official documentation from MySQL Workbench, in which they tell you to set up you ODBC connection as

Name: 'psqlODBC'

This is now the name of the driver. So whatever you have called the name in ODBC will need to match your Driver inside Workbench

enter image description here Name psqlODBC

enter image description here Matches Driver here psqlODBC

And then hopefully you'll get:

enter image description here

like image 188
Jamie Hutber Avatar answered Sep 27 '22 23:09

Jamie Hutber


I encountered the same error. Here is how I solved it:

  1. I downloaded the drivers from https://www.postgresql.org/ftp/odbc/versions/msi/ (Select the most recent one for x64)

  2. In the Overview form, click on the button "Open ODBC Administrator". Add the recently installed "PostgreSQL ANSI(x64)". Click "Finish".

  3. When you "Start Migration", in the source selection form, use "Driver: PostgreSQL ANSI(x64)"

like image 21
Niño Bonita Avatar answered Sep 27 '22 23:09

Niño Bonita