Bug #56233 MySQL ODBC Connector on Windows 2008 64bit
Submitted: 24 Aug 2010 21:24 Modified: 6 Oct 2010 15:41
Reporter: Eric Fuller Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.1.7 OS:Windows (2008 R2 64bit)
Assigned to: Lawrenty Novitsky CPU Architecture:Any
Tags: ODBC 5.1.7, Windows 2008 R2

[24 Aug 2010 21:24] Eric Fuller
Description:
On a Windows Server 2008 R2 system (Amazon EC2) I installed the 64-bit version of the MySQL Connector-OCBC 5.1.7 package using both the MSI Installer and the ZIP (no installer) archive. In both cases the installation appeared to complete without any problem.  Via the ODBC Data Source Administrator I am able to create a System DSN that successfully "tests".  However, once the System DSN is created, it can not be configured or removed.  

A pop up window appears titled: Driver's ConfisDSN, ConfigDriver, or ConfigTranslator failed

The contents of the pop-up indicate:  Errors Found:  Invalid attribute string.

What is truly odd is that the System DSN appears to work when creating a linked server within Microsoft SQL Server 2008 Management Studio.  I am able to connect to and read from the MySQL database.

However, I am unable to remove the "test" ODBC connections, nor configure new ones once they are created.

How to repeat:
Install the 64-bit version of the Connector on a Windows Server 2008 R2
system. Create a System DSN ODBC connection.  Attempt to Configure or Remove.

Suggested fix:
Fix the installer?
[25 Aug 2010 3:43] Eric Tan
Same happens to me on Windows 7 Pro...
[25 Aug 2010 6:12] Bogdan Degtyariov
Hi Eric,

Thank you for reporting the bug.
I was able to repeat it, though the error message is different "Invalid attribute string". However, it looks as being caused by same problem in the DSN configuration.
[25 Aug 2010 10:44] Clyde Fallen
Hi, 

I have the same problem.
What can I do to fix it please ?
[25 Aug 2010 11:53] Bogdan Degtyariov
I am afraid there is only one workaround till the GUI dialog is fixed, which is to edit the windows registry:

 - expand HKLM\SOFTWARE\ODBC\ODBC.INI and delete the registry key
   named as the problem DSN.
 - delete the string value in HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources
   with the same name (not the entire key)
 - create a new Data Source Name using GUI

For instance, if a data source name is mysql_test_64:

delete HKLM\SOFTWARE\ODBC\ODBC.INI\mysql_test_64\
delete HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\(REG_SZ)mysql_test_64
[25 Aug 2010 14:09] Lawrenty Novitsky
Or similarly one can edit DSN right in the registry. That is ugly workaround, but before we know why does it happen, i'm afraid, there is not much choice.
[25 Aug 2010 21:04] Lawrenty Novitsky
Patch for the bug

Attachment: bug56233.diff (text/x-diff), 384 bytes.

[25 Aug 2010 21:09] Eric Fuller
Please excuse my ignorance, but how do I apply that patch?
[26 Aug 2010 5:47] Bogdan Degtyariov
Eric,

You can apply the patch using bzr version control:

1. create the local copy of Connector/ODBC 5.1.7 source tree (bzr must have lp (launchpad) plugin):

bzr branch lp:myodbc my_local_myodbc_src.5.7.1

2. copy the patch file into the directory my_local_myodbc_src.5.7.1

3. apply the patch ()

cd my_local_myodbc_src.5.7.1
bzr patch bug56233.diff

4. Install cmake to create MS Visual Studio projects or makefiles:

cmake -G "Visual Studio 9 2008"
or
cmake -G "NMake Makefile"

5. Build the new driver DLLs from Visual Studio of from command line:

nmake
[26 Aug 2010 12:20] Lawrenty Novitsky
btw bzr "patch" command is from the bzrtools plugin.
[27 Aug 2010 12:54] Eric Fuller
Bogdan,

Wow, that's mainly all greek to me!  I was hoping for an .exe or .msi file as I've never heard of bzr, launchpad, or cmake before.  I was tasked to get a "cloud" Windows 2008 Amazon (EC2) server to talk to our "cloud" Linux Amazon (EC2) server that holds the MySQL database(s).  Since the Amazon server come "pre-configured", I've only had to run a few extra installers so far.  I am not a Windows expert, but merely a few steps above a standard user.

Would it be possible for you to provide an install file for us, or at least let us know when the patch will be officially released (perhaps in a version 5.1.8 installation file)?

Thanks again for your patience and understanding.
[30 Aug 2010 2:33] mark lopresti
I had the same issue when I attempted to create a "System DSN".  Now i can't remove it.

However, when I created a USER DSN, it worked.

I moved to RODBC because some wierd bug with RMYSQL began (Rgui would crash on queries : Windows Vista)and despite all the research online.  On my error logs it was related to a mscvrt.dll file but i'm not sure that is it).

Anyway, I hope this isn't yet another wierd windows administration issue as it seems.
[31 Aug 2010 16:48] Fred Zappert
I encountered the same issue.  I removed 5.1.7, and installed 5.1.6, which works fine.
[31 Aug 2010 19:06] Fred Zappert
I removed some of the extraneous entries via Regedit.
[3 Sep 2010 9:30] Lawrenty Novitsky
on the ftp site 
ftp://ftp.mysql.com/pub/mysql/download/ can be found patched 64bit myodbc5S.dll
directory is not list-able. the filename is myodbc5S5_1_7with56233patchR926.zip
[3 Sep 2010 9:35] Tonci Grgin
It's ftp.mysql.com/pub/mysql/download/myodbc5S5_1_7with56233patchR926.zip
[3 Sep 2010 9:51] Helmut Kulovics
Is there also a patch for the 32bit version of the connector?
Thanks for your reply.
[3 Sep 2010 11:03] Tonci Grgin
Lawrin was so kind as to provide us with built 32bit binaries too:
ftp.mysql.com/pub/mysql/download/myodbc5S5_1_7with56233patchR926win32.zip
[3 Sep 2010 15:45] Eric Fuller
Thank you VERY much for your patience and understanding!!!!  Copying the updated dll fixed the issue and everything works great now.

Will this "fix" be incorporated into future releases of the ODBC connector drivers?

Thanks again to your entire team!

Eric
[6 Sep 2010 5:21] Tonci Grgin
Eric, of course it will be.
[7 Sep 2010 4:01] Valeriy Kravchuk
Bug #56604 was marked as duplicate of this one.
[9 Sep 2010 17:35] Tonci Grgin
Bug#56698 was marked as duplicate of this report.
[14 Sep 2010 13:22] Gaute Bjørnsen
I have tested this driver on Windows 7(32 bit) and Windows XP (32bit) same problem :(
[22 Sep 2010 6:30] Antonio Vizuete
Hi! I'm using UserDNS and I get same problem. The patch for SystemDNS works perfectly, but I need UserDNS. Can anyone post the patch for UserDNS?

Thanks!
[22 Sep 2010 6:39] Antonio Vizuete
I'm silly, I post the previous message before try delete UserDNS and create again. I'm sorry for my previous question. 

Thanks!
[23 Sep 2010 5:52] Tonci Grgin
Bug#56932 was marked as duplicate of this report.
[26 Sep 2010 4:11] Francisco Gonzalez Velasco
Hello,

I can't download the 32 bits version of the patch:

ftp://ftp.mysql.com/pub/mysql/download/ftp.mysql.com/pub/mysql/download/myodbc5S5_1_7with5...

Cheers

Francisco
[26 Sep 2010 4:16] Francisco Gonzalez Velasco
Hello,

Disregard my previous post, after trying a bit more i could download the patch.

Cheers

Francisco
[26 Sep 2010 8:18] Valeriy Kravchuk
Bug #57016 was marked as a duplicate of this one.
[27 Sep 2010 17:10] Valeriy Kravchuk
Bug #57040 was marked as a duplicate of this one.
[28 Sep 2010 15:15] John Torgersen
The new .dll worked for the "Invalid attribute string" error on my XP machine.

However, the VBA DBEngine.RegisterDatabase method for my solution only created the user DSN and named it, but didn't seem to pass the attribute string. This method was an issue for 5.1 in the past, and kept us using 3.51 until it was fixed recently.

If someone could comfirm that the DBEngine.RegisterDatabase method works in the next release, that would be great.

Thank you for the hard work.
[1 Oct 2010 19:02] Lawrenty Novitsky
John, does the Bug#48195 describe the same problem you are talking about?
[1 Oct 2010 19:33] John Torgersen
Unfortunately, no, that bug report seems to describe a condition where the ODBC admin window pops up on the user because the Silent option can't be set to True.

The behavior that I observed had the method creating the user DSN and passing in the name, but none of the other attributes were passed. They were blank in the ODBC admin configuration window on my 32-bit XP machines.

The window also popped up, but it may have been because it needed attention to complete the connection.

Thank you for your help.
[1 Oct 2010 19:53] Lawrenty Novitsky
John, I would appreciate then if you file a bug report with a testcase =) I won't promise a fast fix, but... will see :) Anyway it would be useful to have a separate bug report on the issue.
[4 Oct 2010 17:56] Valeriy Kravchuk
Bug #57217 was marked as a duplicate of this one.
[6 Oct 2010 1:09] Warren Stevens
This is not a bug.  It is an issue with Windows 7 (and apparently 2008 Server 64) because there are two versions of the ODBC data sources manager.

a. Remove MySQL 64 bit driver (Programs - Remove) and Restart.
b. Download/Install the 64 bit MySQL ODBC driver with both 32/64 bit drivers. 
b. Search/Grep all the copies of odbcad32.exe, there should be two on your box.
c. Use the 32 bit version of odbcad32.exe for 32 bit, etc.. or just try both of them, one should work. Read the link and you will understand.

see: http://msdn.microsoft.com/en-us/library/ms712362(VS.85).aspx

tl;dr

"To manage a data source that connects to a 32-bit driver under 64-bit platform, use c:\windows\sysWOW64\odbcad32.exe. To manage a data source that connects to a 64-bit driver, use c:\windows\system32\odbcad32.exe."
[6 Oct 2010 15:41] Tony Bedford
An entry has been added to the 5.1.8 changelog:

After installing MySQL Connector/ODBC on Windows Server 2008 64-bit, the system DSN created could not be configured or deleted. An error dialog was displayed, showing the error message “Invalid attribute string”.
[6 Oct 2010 16:23] Tony Bedford
Changelog entry modified:

After installing MySQL Connector/ODBC, the system DSN created could not be configured or deleted. An error dialog was displayed, showing the error message “Invalid attribute string”.

In this case the problem was due to the fact that the driver could not parse the NULL-separated connection string.
[14 Oct 2010 21:05] Stuart Jacobson
Hi,

I am a neophyte at applying patches as well and I can;t find the zip file you prepared for the guy below.  Is it gone or am I messing up something?
[14 Oct 2010 21:07] Stuart Jacobson
btw - this is the patch I am looking for ...ftp.mysql.com/pub/mysql/download/myodbc5S5_1_7with56233patchR926.zip
[21 Nov 2010 20:40] Andrew Duty
I seem to be having the same issue with Windows XP Pro.  I've been trying to follow the instructions for deletion through the registry.  I finally figured out that the HKLM in HKLM\SOFTWARE\ODBC\ODBC.INI  means HKEY_LOCAL_MACHINE.  I've been searching for an hour, but can't seem to find the DSN names I created.  Then I thought maybe I didn't create them on Local_Machine.  Turns out I created User DSNs with the same issue.  So they'd be in HKEY_CURRENT_USER for me or HCU for those who like typing shortcuts or acronyms others can't understand.  Anyway, excellent solution.  Thanks
[21 Nov 2010 21:06] Lawrenty Novitsky
Andrew, the problem has been solved in the 5.1.8 release. No need to play with registry any more.
[14 Dec 2011 8:26] hzf hzf
On a Windows Server 2008 R2 system (Amazon EC2) I installed the 64-bit version of the
MySQL Connector-OCBC 5.1.9 package using both the MSI Installer and the ZIP (no
installer) archive. In both cases the installation appeared to complete without any
problem.  Via the ODBC Data Source Administrator I am able to create a System DSN that
successfully "tests".  However, I could not connect to mysql by asp.net.
[28 Sep 2012 13:53] wu canvas
Could not download the patch expect the diff file,but i don't known how to use it! Is any version can not break out this bug ? thank you .. hope you bless me , my god!