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

Peter picture Peter · Jun 21, 2010 · Viewed 20.2k times · Source

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?

Answer

TallTed picture TallTed · Jun 21, 2010

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.