Bug #31495 Attempt to create System DSN results in User DSN on Mac OS X
Submitted: 9 Oct 2007 23:07 Modified: 13 Dec 2010 7:13
Reporter: Danny Kohn Email Updates:
Status: Closed Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.20, 3.51.25, 5.1.4 OS:MacOS (10.4.10)
Assigned to: Lawrenty Novitsky CPU Architecture:Any

[9 Oct 2007 23:07] Danny Kohn
When attempting to create a System DNS data source with the MySQL Connector ODBC, the result ends up as a User DNS. This happens with both 3.51.20 and 5.1.0 alpha.

Jim Winstead replied to my forum post regarding this issue stating "it looks like a bug in Mac OS X's iODBC driver manager that we'll need to work around."

How to repeat:
When using OS X ODBC Administrator and clicking "Add" under the System DNS tab, the resulting DNS show up under the User DNS tab.

When using the command line myodbc3i with the -ss flag, it shows under the -su list and not the -ss list.
[29 Oct 2007 21:39] Jim Winstead
This is still broken with Leopard.
[4 Mar 2008 3:14] Jim Winstead
Work around iODBC config mode bug, and set correct perms in postflight

Attachment: bug31495.diff (text/plain), 17.64 KiB.

[4 Mar 2008 3:15] Jim Winstead
This is because of bugs in the iODBC driver manager install API, which incorrectly resets the configuration mode as functions are called.

Even when this problem in iODBC is worked around, it is possible that the ODBC Administrator application cannot register a system DSN because of incorrect permissions on /Library/ODBC/odbc.ini. This file must be made writable by the 'admin' group. The patch fixes the installer to do this.
[12 Mar 2008 15:20] Darrell Rohl
Still a problem (and a quite critical one) for me. Is there any estimate on how long the patch will be pending? Is it possible to get an already-patched installer?
[12 Mar 2008 16:36] Lawrenty Novitsky
it's ok w/ one important remark.
MYODBCUtilReadDataSource.c doesn't compile on Win
move "SAVE_MODE();" after nMode definition in #if defined(WIN32) block, add #else, and copy it there too.

and couple small things:
 "... we we start" in postflight in comment;
and probably it's better to undef WRITE_VALUE in MYODBCUtilWriteDataSource.c after use.
[12 Mar 2008 16:41] Jim Winstead
The fix for this has been committed, and will be included in the upcoming 3.51.24 release.
[14 Mar 2008 18:42] MC Brown
A note has been added to the 3.51.24 changelog: 

When creating a System DSN using the ODBC Administrator on Mac OS X, a User DSN would be created instead. The root cause is a problem with the iODBC driver manager used on Mac OS X. The fix works around this issue.


ODBC Administrator may still be unable to register a System DSN unless the /Library/ODBC/odbc.ini file has the correct permissions. You should ensure that the file is writable by the admin group.

(Same note added to main C/ODBC documentation)
[22 May 2008 21:05] Sveta Smirnova
Reopen as bug is repeatable for me with version 3.51.25 even with permissions 777 for /Library/ODBC/odbc.ini (I tried 664 at first)

See also bug #36820
[22 May 2008 21:20] Sveta Smirnova
Version 5 affected as well.

Tested on Tiger 10.4.11
[22 May 2008 21:30] Sveta Smirnova
Currently bug is repeatable only with Tiger.

The workaround is to use the command-line myodbc3i or myodbc-installer utility for creating system dsns or upgrade to Leopard.
[13 Dec 2010 7:13] Bogdan Degtyariov
Thank you for your bug report. This issue has already been fixed in the latest released version (3.51.27) of that product, which you can download at