[unixODBC-support] Re: unixODBC-support Digest, Vol 11, Issue 6

Eric Sharkey sharkey at netrics.com
Wed May 11 15:35:21 BST 2005


> obdc.ini
> 
> [root at h50_3:/usr/local/etc]# cat odbc.ini
> Driver = unixODBC
> # IP or DNS name of server
> Server = 172.27.201.133
> Database = kioscos
> Trace = yes
> TraceFile=/tmp/odbc.trace
> Debug=yes
> DebugFile=/tmp/odbc.log
> UID = sa
> 
> [root at h50_3:/usr/local/etc]# cat odbcinst.ini
> [MySQL]
> Description = ODBC for MySQL
> Driver = /usr/local/lib/libiodbc.so.2
> FileUsage = 1

This is wrong in many ways.

Your odbc.ini does not have any dsn defined.  It should start with
a datasource name in square brackets at the top of the file.
The driver line must specify one of the entries in odbcinst.ini.
And your Driver line in your odbcinst.ini does not specify a
valid MySQL odbc driver, it points to the iodbc driver manager, which
is a completely separate piece of software which should not be used
with unixODBC.  You need to use either unixODBC or iODBC, but not
both.

You want something like:

odbc.ini:

[MySQL-kioscos]
Driver = MySQL
# IP or DNS name of server
Server = 172.27.201.133
Database = kioscos
UID = sa

odbcinst.ini:

[MySQL]
Description = ODBC for MySQL
Driver = /usr/local/lib/libmyodbc.so
FileUsage = 1

And use the dsn MySQL-kioscos when you try to connect with isql.

Eric



More information about the unixODBC-support mailing list