[unixODBC-support] Error using isql - database not bound to DSN?

Gallagher James jgallagher at opendap.org
Wed Aug 29 21:02:38 BST 2012


I'm using unixODBC 2.3.1 to talk to a MySQL database on OS/X 10.7 using the ODBC driver from MySQL.

I can connect to the mysql server and issue commands (SHOW DATABASES; USE <database>, …) but based on my configuration I think that a particular database should be USEd when I start up isql. Here's how I'm starting isql:

isql myodbc5 jimg

And here are my odbc.ini and odbcinst.ini files:

[ODBC Data Sources]
data_source_name = myodbc5

Driver          = MyODBC
DATABASE        = test
SERVER          = localhost
UID             = jimg
PASSWORD        =
# SOCKET          = /tmp/connector-odbc-5.1-64bit/tmp/mysqld.1.sock             

[ODBC Drivers]
MyODBC = Installed
# /usr/local/lib/libmyodbc5.so = Installed

Driver = /usr/local/lib/libmyodbc5.so
Description = Driver for connecting to MySQL database server
Threading = 0

Based on this, I think that the database 'test' should be in use once the connection with unixODBC is made. Is that correct? Or is there something I'm missing from this configuration that would enable that behavior?

James Gallagher
jgallagher at opendap.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20120829/7432c3ad/attachment.bin>

More information about the unixODBC-support mailing list