[unixODBC-support] Cannot use unixODBC 2.2.14 with MySQL ODBC connector 5.1

Ken Resander kresander at yahoo.com
Tue May 26 08:28:14 BST 2009

Hi Itachi,

I am still on MyODBC 3.51 and unixODBC 2.2.11 and had to struggle and google a lot before I could connect and ended up with the following ini files:

Driver        = /usr/local/lib/libmyodbc3.so
Description    = MyODBC 3.51 Driver

Driver      = MYSQL
SERVER      = localhost
PORT        = 
USER        = root
Password    = 
Database    = 
OPTION      = 3
SOCKET      = /var/run/mysqld/mysqld.sock

I did not use any ODBC administrator and I just typed it in using gksudo gedit /etc/...
The SOCKET property was the important (non-obvious) step.

What is the content of your ini files for ODBC 3.51 and ODBC 5.1?

Have you tried ODBC 5.1 with unixODBC 2.2.11? and unixODBC 2.2.14 with ODBC 3.51?

I did not use isql. I used my own test program. You can find a mimimal version of that in my post to Nick 'Program works from commandline but not from codeblocks IDE' made yesterday or the day before yesterday. With such a tiny program you are in control and can single step through your code and see what happens. You can also trace system calls using Linux strace and check if the MySQL driver is found and all other libraries it depends on. 


P.S. I have just seen Nick's response to your post. I have ODBCINI set in my bashrc startup script. I don't know if it is needed by MySQL.

      Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20090526/6f5e29af/attachment.html>

More information about the unixODBC-support mailing list