views:

28

answers:

2

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?

+1  A: 

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

VoodooChild
+1  A: 

The key question is whether your ODBC client application -- the thing that's going to use the data -- is 32-bit or 64-bit. 64-bit Windows 7 supports both 32-bit and 64-bit applications. 32-bit applications can only use 32-bit drivers; 64-bit applications 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 Administrator. The 32-bit Administrator is counterintuitively found at C:\Windows\SysWow64\odbcad32.exe, and the 64-bit Administrator is likewise counterintuitively found at C:\Windows\System32\odbcad32.exe.

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 tools (including the Administrator), and it shows 64-bit User DSNs to 32-bit client tools (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 drivers/DSNs.

TallTed
But shouldn't the 32bit MySQL driver show up using C:\Windows\System32\odbcad32.exe if I installed the 32bit driver? ThanksPete
Peter
No -- the System32\odbcad32.exe is the 64-bit Administrator, and will only work against 64-bit drivers. This is where 64-bit drivers will show up.The SysWow64\odbcad32.exe is the 32-bit Administrator, which must be used against 32-bit drivers. This is where 32-bit drivers will show up.Microsoft has a few KB articles about this. I've added a link to one of them above.
TallTed