Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm trying to install the MySQL connector on a windows 7 systembut it doesn't show up in the ODBC add window

This is under Windows 7 64 bit. I downloaded the 64 bit drivers and as a matter of fact I tried all the windows drivers(uninstalling the previous ones first though). But when I try to configure a new ODBC connection the MySQL driver doesn't show up.

Do I need to install some other package before I can get the connector to work? Like MDAC or .NET or something else?

like image 345
Peter Avatar asked Jun 21 '10 17:06

Peter


People also ask

Which ODBC driver should I use for MySQL?

We want to set up MySQL ODBC Data source, hence choose MySQL ODBC 8.0 ANSI Driver or MySQL ODBC 8.0 Unicode Driver and click on Finish. A dialog box MySQL Connector/ODBC Data Source configuration opens. In the Data Source name and description text box, provide the desired name and the description of the Data source.

Where is MySQL ODBC driver located?

Open Control Panel > Administrative tools > ODBC Data Sources (64-bit) > System DSN tab > Add. This will launch the Create New Data Source wizard. Select MySQL ODBC 8.0 ANSI driver from the list and click Finish.


2 Answers

The key question is whether your ODBC client executable -- the thing that's going to load the driver library and use the data -- is 32-bit or 64-bit. 64-bit Windows (XP, Vista, 7, 8, Server 2003, Server 2008, and all other variants to date) supports both 32-bit and 64-bit binary executables/libraries. 32-bit executables (usually found in Program Files (x86)) can only use 32-bit drivers; 64-bit executables (usually found in Program Files) can only use 64-bit drivers.

Once you've figured that part out, you have to install a matching 32-bit or 64-bit driver for MySQL, and configure it with the right ODBC Administrator. The 32-bit ODBC Administrator is counterintuitively found at C:\Windows\SysWow64\odbcad32.exe, and the 64-bit ODBC Administrator is likewise counterintuitively found at C:\Windows\System32\odbcad32.exe. (Yes, both are named odbcad32 and the directory names suggest the other bitness -- but what I've just said is accurate.)

For more on this, you can read the article posted on my employer's website

Note that for added fun, Microsoft's ODBC driver manager (the MDAC) has a bug in that it shows 32-bit User DSNs to 64-bit client executables (including the Administrator), and it shows 64-bit User DSNs to 32-bit client executables (again, including the Administrator) -- even though these mis-matches cannot work together. For this reason, I strongly recommend using only System DSNs in any environment that may have a mix of 32-bit and 64-bit executables/drivers/DSNs.

like image 147
TallTed Avatar answered Oct 21 '22 05:10

TallTed


Try running the ODBC from "C:\Windows\SysWOW64" instead of from "C:\Windows\System32".

like image 38
VoodooChild Avatar answered Oct 21 '22 04:10

VoodooChild