13

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?

7
  • 1
    Do you already installed postgresql driver on your system? Commented Oct 5, 2014 at 3:47
  • Yes I already installed psqlodbc driver psqlodbc_09_03_0300.zip from herer: postgresql.org/ftp/odbc/versions/msi Commented Oct 5, 2014 at 3:51
  • You need to test some: - Check the database accept remote connections over TC, - Check if your password is correct Commented Oct 5, 2014 at 4:05
  • I have checked already, have been struggling with this all day Commented Oct 5, 2014 at 4:14
  • 2
    From deleted answer: The driver names are: Driver={PostgreSQL ANSI} (32-bit ANSI codepage), Driver={PostgreSQL Unicode} (32-bit UTF-16 Unicode), Driver={PostgreSQL ANSI(x64)} (64-bit ANSI codepage), Driver={PostgreSQL Unicode(x64)} (64-bit UTF-16 Unicode). Commented Oct 6, 2014 at 1:15

7 Answers 7

10

In my case I was using Windows 64bit and using "PostgreSQL ANSI(x64)" did connect to the Postgres database but it gave errors while migrating the database from Postgres to Mysql. I used the driver "PostgreSQL Unicode(x64)" and it worked. If your data contains unicode characters i.e. non ASCII characters use "PostgreSQL Unicode(x64)" drivers. enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

PostgreSQL ANSI(x64) did the job for me
4

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)"

Comments

2

Just quoting Craig Ringer's comment to make it "more visible"

If you have Windows 64Bits then you probably had installed only the 64bit psqlodbc drivers, so all you need is to use e.g.: PostgreSQL ANSI(x64) (I had used that and worked for me)

Just stuck onto it for at least 1h until came into Craig's comment, Thanks man!

1 Comment

It is working for me i just changed PostgreSQL ANSI to PostgreSQL ANSI(x64)
2

For those on Ubuntu install the postgres ODBC drivers:

apt-get install odbc-postgresql

Comments

1

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

1 Comment

that "name" from Mysql Workbench must be the same as name in ODBC - that was my problem!! Thanks
0

This worked for me (w/ ODBC installed):

  1. Click "Open ODBC Administrator" button
  2. Go to "Drivers" tab
  3. Copy the "Name" Column value from your ODBC and close popup
  4. In tab "Parameters", "Driver" field, Past the "Name" copied
  5. Test connection

Comments

-3

Download and install the MSI package for psqlODBC from http://www.postgresql.org/ftp/odbc/versions/msi/ .

Then connect using the following settings
Driver: PostgreSQL ANSI
Connection method: ODBC (Manually entered parameters)
This worked for me.

2 Comments

This does not work. Can you add a little more detail on how this worked for you? How you installed it? What file you downloaded? Version?32 bit? 64bit? Please add more details, I have been struggling on this.
same comment as above, this answer is so random

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.