DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) DSN on Unix

Info Catalog (mysql.info.gz) DSN on Windows (mysql.info.gz) MyODBC Configuration (mysql.info.gz) Connection parameters
 
 23.1.9.3 Configuring a MyODBC DSN on Unix
 .........................................
 
 On `Unix', you configure DSN entries directly in the `odbc.ini' file.
 Here is a typical `odbc.ini' file that configures `myodbc' and
 `myodbc3' as the DSN names for MyODBC 2.50 and MyODBC 3.51,
 respectively:
 
      ;
      ;  odbc.ini configuration for MyODBC and MyODBC 3.51 drivers
      ;
 
      [ODBC Data Sources]
      myodbc      = MyODBC 2.50 Driver DSN
      myodbc3     = MyODBC 3.51 Driver DSN
 
      [myodbc]
      Driver       = /usr/local/lib/libmyodbc.so
      Description  = MyODBC 2.50 Driver DSN
      SERVER       = localhost
      PORT         =
      USER         = root
      Password     =
      Database     = test
      OPTION       = 3
      SOCKET       =
 
      [myodbc3]
      Driver       = /usr/local/lib/libmyodbc3.so
      Description  = MyODBC 3.51 Driver DSN
      SERVER       = localhost
      PORT         =
      USER         = root
      Password     =
      Database     = test
      OPTION       = 3
      SOCKET       =
 
      [Default]
      Driver       = /usr/local/lib/libmyodbc3.so
      Description  = MyODBC 3.51 Driver DSN
      SERVER       = localhost
      PORT         =
      USER         = root
      Password     =
      Database     = test
      OPTION       = 3
      SOCKET       =
 
 Refer to the  Connection parameters, for the list of connection
 parameters that can be supplied.
 
 * If you are using unixODBC, you can use the following tools in
 order to set up the DSN:
 
    * ODBCConfig GUI tool(HOWTO: ODBCConfig
      (http://www.unixodbc.org/config.html))
 
    * odbcinst
 
 In some cases when using unixODBC, you might get this error:
 
      Data source name not found and no default driver specified
 
 If this happens, make sure the `ODBCINI' and `ODBCSYSINI' environment
 variables are pointing to the right `odbc.ini' file.  For example, if
 your `odbc.ini' file is located in `/usr/local/etc', set the
 environment variables like this:
 
      export ODBCINI=/usr/local/etc/odbc.ini
      export ODBCSYSINI=/usr/local/etc
 
Info Catalog (mysql.info.gz) DSN on Windows (mysql.info.gz) MyODBC Configuration (mysql.info.gz) Connection parameters
automatically generated byinfo2html