Bug #60812 Getting error 126 when adding dsn
Submitted: 9 Apr 2011 3:27 Modified: 9 Mar 2012 4:21
Reporter: Marcus Edwards Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.1.8 OS:Windows (win7 64bit)
Assigned to: Bogdan Degtyariov CPU Architecture:Any
Tags: win 7 64 bit mysql odbc

[9 Apr 2011 3:27] Marcus Edwards
Description:
Trying to add dsn(mysql ODBC5.1 32 bit) however getting the error 126 suggesting the module C:\windows\system32\myodbc5s.dll can not be found. I am using the C:\Windows\SysWOW64\odbcad32 and the 32bit driver as I am trying to connect with access. I have checked the registery entries to the driver which appear ok.

It should be noted attempts on non 64bit / win7 machines works well. Use of the 64bit driver on the win7/64bit machine also is successful in adding a dsn, but this can not be used with access suggesting the application and the driver are incompatible.

Marcus

How to repeat:
Using the 32 bit mysql ODBC5.1 32 bit on a win 7 64bit machine attempt to add a dsn with the C:\Windows\SysWOW64\odbcad32 app.
[9 Apr 2011 3:29] Marcus Edwards
error message

Attachment: error.png (image/png, text), 27.77 KiB.

[9 Apr 2011 3:33] Marcus Edwards
error message

Attachment: error2.png (image/png, text), 25.83 KiB.

[9 Apr 2011 3:34] Marcus Edwards
error message

Attachment: error4.png (image/png, text), 109.33 KiB.

[9 Apr 2011 3:34] Marcus Edwards
error message

Attachment: error5.png (image/png, text), 41.26 KiB.

[10 Apr 2011 9:55] Valeriy Kravchuk
What exact version, 5.1.x, do you use?

Please, check http://bugs.mysql.com/bug.php?id=55495 for possible solution.
[10 Apr 2011 10:36] Marcus Edwards
The ODBC driver version is the 5.1.8 using the 
mysql-connector-odbc-noinstall-5.1.8-winx64.zip installer.

In reading the other info it is suggested the 64bit will install both 64bit and the 32 bit. However after installing the 64bit driver there is no sign of the 32bit driver in the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI or for that matter in the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Drivers directory, which I assume houses the names available to the 32bit data source administrator found in the %windir%\SysWOW64 directory. It was this reason I downloaded the 32bit driver hoping this would work, however this failed as per my original post. I look forward to a solution soon.
[27 Apr 2011 11:45] Bogdan Degtyariov
Marcus, can you briefly describe how exactly you installed Connector/ODBC driver?
Was it msi installer or you downloaded the non-install zip package and executed install.bat?

MSI installer for version 5.1.8 should never try registering the driver in System32 or SysWow64. However, install.bat could do that even though the default installation directory for the driver is "Program Files (x86)\MySQL\Connector ODBC 5.1".

Anyway, I set the bug status to Verified because of incorrect work of install.bat.
[30 Apr 2011 11:39] Marcus Edwards
I downloaded the non-install zip package and executed
install.bat?
[9 Mar 2012 4:21] Bogdan Degtyariov
The problem with install.bat script is fixed now.
It is registering the driver at the current location of the unpacked directory instead of WINDOWS\SYSTEM32.

This bug is closed now.