[unixODBC-support] Re: Help! with setup, please.

Bob Marcum bmarcum at houston.rr.com
Sun Nov 19 15:24:11 GMT 2006



Nick Gorham wrote:
>>
> Ok, first thing, you have a iODBC format set of ini files, they sould 
> work with unixODBC,

Nick, I am running FC5 and unixODBC was installed at OS installation time, I guess.  That is, there was already a set of odbc.ini and odbcinst.ini files on the system when I installed the MySQl 3.51 driver and installed the latest unixODBC.  I missed the guidance to configure in a way that would not have resulted in iODBC format (didn't know any better).  Should I uninstall and change any of that now?

> but what I would have done is loose the
> 
> [ODBC Data Sources]
> myodbc      = MyODBC 2.50 Driver DSN
> myodbc3     = MyODBC 3.51 Driver DSN
 
> entry in odbc.ini,

Commented out - for now - in the odbc.ini file I now have [below].

> 
> in odbcinst.ini add a
> 
> [ODBC]
> Tracing = Yes
> TraceFile = /tmp/sql.log
> 
> That will turn on unixODBC DM tracing.

Done, and I do now get a trace file but, of course, I can't decipher it.

> Then in your odbc.ini entry, reference the odbcinst.ini entry, not 
> directly to the driver, so have
> 
> [Default]
> Driver       =  MySQL ODBC 3.51 Driver
> Description  = Connector/ODBC 3.51 Driver DSN
> SERVER       = localhost
> PORT         =
> USER         = Password     = Database     = OPTION       = 4
> SOCKET       =

Done.

> 
> Finally if you add -v to isql it will show you any returned errors.
> 
> isql -v dsn user password

and this is what I get:
# isql -v Default CSRapp CSRapp
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect

Same if I try it just this way:
# isql -v Default
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect


My present .ini files:

[odbcinst.ini]
[PostgreSQL]
Description		= ODBC for PostgreSQL
Driver		= /usr/lib/libodbcpsql.so
Setup		= /usr/lib/libodbcpsqlS.so
FileUsage		= 1

[MySQL ODBC 3.51 Driver]
Description	= MySQL driver
Driver		= /usr/lib/libmyodbc3.so
Driver64	= 
Setup		= /usr/lib/libmyodbc3S.so
Setup64		= 
UsageCount	= 1
CPTimeout	= 
CPReuse		= 

[ODBC]
TraceFile    = /root/unixODBCTrace
Trace	     = yes

[odbc.ini]

;[ODBC Data Sources]
;myodbc      = MyODBC 2.50 Driver DSN
;myodbc3     = MyODBC 3.51 Driver DSN

[myodbc]
Driver       = /usr/lib/libmyodbc.so
Description  = MyODBC 2.50 Driver DSN
SERVER       = localhost
PORT         =
USER         = root
Password     =
Database     = test
OPTION       = 3
SOCKET       =

[myodbc3]
Driver       = /usr/lib/libmyodbc3.so
Description  = Connector/ODBC 3.51 Driver DSN
SERVER       = localhost
PORT         =
USER         = 
Password     = 
Database     = 
OPTION       =
SOCKET       =

[Default]
Driver       = MyODBC 3.51 Driver
Description  = Connector/ODBC 3.51 Driver DSN
SERVER       = localhost
PORT         =
USER         = 
Password     = 
Database     = 
OPTION       = 4
SOCKET       =


Nick, thank you for your competent, prompt response!






More information about the unixODBC-support mailing list