MyODBC connection problems on a Mac
am 13.04.2006 11:09:26 von Ken TozierHi
I'm having no luck getting MyODBC to work on a Mac. I downloaded the
installer here: http://dev.mysql.com/downloads/connector/odbc/3.51.html
Followed the DSN setup instructions here: http://dev.mysql.com/doc/
refman/4.1/en/dsn-on-unix.html
Verified that my paths variables were set up correctly by running
"set" from the terminal.
Wrote a small PHP script that calls odbc_connect:
$db_connection = odbc_connect('myodbc', 'ktozier', 'parkerdog')
or die('Could not connect: ' . odbc_error());
And keep getting the error: "Could not connect:IM002"
I Googled that error which was explained here: http://
www.easysoft.com/support/kb/kb00073.html
"IM002 - DSN or TargetDSN not found. The DSN specified in the
connection string could not be found by the OOB client in the
odbc.ini file."
Made sure the path defined in the odbc.ini file points to the myodbc
driver (it does)
And that's where it stands now. Completely stuck.
Anyone have any insights into what else I should try?
Thanks
Ken
Here's the odbc.ini file:
[ODBC Data Sources]
myodbc = MySQL ODBC 3.51 Driver
[myodbc]
Driver = /usr/lib/libmyodbc3.dylib
SERVER = localhost
PORT =
USER =
Password =
Database =
OPTION = 3
SOCKET =
[ODBC]
TraceAutoStop = 0
TraceFile =
TraceLibrary =
Here's the contents of the odbcinst.ini file:
[ODBC Drivers]
MySQL ODBC 3.51 Driver = Installed
[MySQL ODBC 3.51 Driver]
Driver = /usr/lib/libmyodbc3.dylib
Setup =
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org