Configuring Connector/ODBC
1769
Note
If you are using
unixODBC
, you can use the following tools to set up the DSN:
•
ODBCConfig
GUI tool (
HOWTO: ODBCConfig
)
•
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
20.1.4.6. Connecting Without a Predefined DSN
You can connect to the MySQL server using
SQLDriverConnect
, by specifying the
DRIVER
name
field. Here are the connection strings for Connector/ODBC using DSN-Less connections:
For Connector/ODBC 3.51:
ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};\
SERVER=localhost;\
DATABASE=test;\
USER=venu;\
PASSWORD=venu;\
OPTION=3;"
If your programming language converts backslash followed by whitespace to a space, it is preferable
to specify the connection string as a single long string, or to use a concatenation of multiple strings that
does not add spaces in between. For example:
ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};"
"SERVER=localhost;"
"DATABASE=test;"
"USER=venu;"
"PASSWORD=venu;"
"OPTION=3;"
Note.
On Mac OS X, you might need to specify the full path to the Connector/ODBC driver library.
Refer to
Section 20.1.4.2, “Connector/ODBC Connection Parameters”
for the list of connection
parameters that can be supplied.
20.1.4.7. ODBC Connection Pooling
Connection pooling enables the ODBC driver to re-use existing connections to a given database from
a pool of connections, instead of opening a new connection each time the database is accessed. By
enabling connection pooling you can improve the overall performance of your application by lowering
the time taken to open a connection to a database in the connection pool.
For more information about connection pooling:
http://support.microsoft.com/default.aspx?scid=kb;EN-
US;q169470
.
20.1.4.8. Getting an ODBC Trace File
If you encounter difficulties or problems with Connector/ODBC, start by making a log file from the
ODBC
Manager
and Connector/ODBC. This is called tracing, and is enabled through the ODBC Manager.
The procedure for this differs for Windows, Mac OS X and Unix.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...