Spec-Zone .ru
спецификации, руководства, описания, API
|
The ODBC Data Source Administrator
within Windows lets you create DSNs, check
driver installation and configure ODBC systems such as tracing (used for debugging) and connection pooling.
Different editions and versions of Windows store the ODBC Data Source Administrator
in different locations depending on the version of Windows that you are using.
To open the ODBC Data Source Administrator
in Windows Server 2003:
To identify whether a DSN was created using the 32-bit or the 64-bit driver, include the driver
being used within the DSN identifier. This will help you to identify the right DSN to use with applications
such as Excel that are only compatible with the 32-bit driver. For example, you might add Using32bitCODBC
to the DSN identifier for the 32-bit interface and Using64bitCODBC
for those using the 64-bit Connector/ODBC driver.
On the Start
menu, choose Administrative
Tools
, and then click Data Sources (ODBC)
.
To open the ODBC Data Source Administrator
in Windows 2000 Server or Windows 2000
Professional:
On the Start
menu, choose Settings
,
and then click Control Panel
.
In Control Panel
, click Administrative
Tools
.
In Administrative Tools
, click Data
Sources (ODBC)
.
To open the ODBC Data Source Administrator
on Windows XP:
On the Start
menu, click Control
Panel
.
In the Control Panel
when in Category
View
click Performance and Maintenance
and then click Administrative Tools.
. If you are viewing the Control
Panel
in Classic View
, click Administrative
Tools
.
In Administrative Tools
, click Data
Sources (ODBC)
.
Irrespective of your Windows version, you should be presented the ODBC Data Source
Administrator
window:
Within Windows XP, you can add the Administrative Tools
folder to your menu to make it easier to locate the ODBC Data Source Administrator. To do
this:
Right-click the
menu. Select Properties
.
Click
.Select the
tab. Within Start menu items
, within the System Administrative Tools
section, select Display on
the All Programs menu
.
Within both Windows Server 2003 and Windows XP, consider permanently adding the ODBC Data
Source Administrator
to your menu. To do this, locate the Data Sources (ODBC)
icon using the methods shown, then right-click on the icon and
then choose .
The interfaces for the 3.51 and 5.x versions of the Connector/ODBC driver are different, although the fields and information that you need to enter remain the same.
To configure a DSN using Connector/ODBC 5.2, see Section 22.1.4.3.1, "Configuring a Connector/ODBC 5.x DSN on Windows".
Due to the native Unicode support within Connector/ODBC, you do not need to specify the initial character set to be used with your connection.
To add or configure a Connector/ODBC 5.x DSN on Windows, use either the command-line, or the ODBC Data Source Administrator
GUI.
Open the ODBC Data Source Administrator
.
To create a System DSN (which will be available to all users), select the System DSN tab. To create a User DSN, which will be unique only to the current user, click the button.
Select the ODBC driver for this DSN.
Select MySQL ODBC 5.
for the appropriate level of Connector/ODBC, then click .
x
Driver
You now need to configure the specific fields for the DSN you are creating
through the Connection Parameters
dialog.
In the Data Source Name box, enter the name of the data source to access. It can be any valid name that you choose.
In the Description box, enter some text to help identify the connection.
In the Server field, enter the name of the MySQL
server host to access. By default, it is localhost
.
In the User field, enter the user name to use for this connection.
In the Password field, enter the corresponding password for this connection.
The Database pop-up should automatically populate with the list of databases that the user has permissions to access.
To communicate over a different TCP/IP port than the default (3306), change the value of the Port.
Click
to save the DSN. To verify the connection using the parameters you have entered, click the Success; connection was made!
dialog.
You can configure a number of options for a specific DSN by using the
button.The Details button opens a tabbed display where you set additional options:
Flags 1, Flags 2, and Flags 3 enable you to select the additional flags for the DSN connection. For more information on these flags, see Section 22.1.4.2, "Connector/ODBC Connection Parameters".
Debug lets you turn on ODBC debugging to record
the queries you execute through the DSN to the myodbc.sql
file. For
more information, see Section 22.1.4.8, "Getting an
ODBC Trace File".
SSL Settings configures the additional options required for using the Secure Sockets Layer (SSL) when communicating with MySQL server. Note that you must also enable SSL and configure the MySQL server with suitable certificates to communicate over SSL.
The Section 22.1.4.2, "Connector/ODBC Connection Parameters", for information about the meaning of these options.
tab lets you configure Connector/ODBC connection parameters. Refer toUse myodbc-installer.exe when configuring Connector/ODBC 5.1 or later from the command-line.
Execute myodbc-installer.exe without arguments to view a list of available options.
This section answers Connector/ODBC connection-related questions.
While configuring a Connector/ODBC DSN, a Could Not Load Translator or Setup Library
error occurs
For more information, refer to ctl3d32.dll
in your system
directory.
On Windows, the default myodbc5w.dll
(Unicode) or
myodbc5a.dll
(ANSI) is compiled for optimal performance. To debug
Connector/ODBC (for example, to enable tracing), instead use myodbc5d.dll
. To install this file, copy myodbc5d.dll
over the installed myodbc5w.dll
or myodbc5a.dll
file. Make sure to revert back to the release version
of the driver DLL once you are done with the debugging, because the debug version may cause
performance issues.