OnUnix, you configure DSN entries directly in theodbc.ini file. Here is a typicalodbc.ini file that configuresmyodbc9w (Unicode) andmyodbc9a (ANSI) as DSN names for Connector/ODBC 9.5:
;; odbc.ini configuration for Connector/ODBC 9.5 driver;[ODBC Data Sources]myodbc9w = MyODBC 9.5 UNICODE Driver DSNmyodbc9a = MyODBC 9.5 ANSI Driver DSN[myodbc9w]Driver = /usr/local/lib/libmyodbc9w.soDescription = Connector/ODBC 9.5 UNICODE Driver DSNSERVER = localhostPORT =USER = rootPassword =Database = testOPTION = 3SOCKET =[myodbc9a]Driver = /usr/local/lib/libmyodbc9a.soDescription = Connector/ODBC 9.5 ANSI Driver DSNSERVER = localhostPORT =USER = rootPassword =Database = testOPTION = 3SOCKET =Refer to theSection 5.2, “Connector/ODBC Connection Parameters”, for the list of connection parameters that can be supplied.
If you are usingunixODBC, you can use the following tools to set up the DSN:
ODBCConfigGUI tool (HOWTO: ODBCConfig)odbcinst
In some cases when usingunixODBC, you might get this error:
Data source name not found and no default driver specified If this happens, make sure theODBCINI andODBCSYSINI environment variables are pointing to the rightodbc.ini file. For example, if yourodbc.ini file is located in/usr/local/etc, set the environment variables like this:
export ODBCINI=/usr/local/etc/odbc.iniexport ODBCSYSINI=/usr/local/etc