当前位置:Gxlcms > mysql > C-Sharpcorner

C-Sharpcorner

时间:2021-07-01 10:21:17 帮助过:41人阅读

Introduction

Open Database Connectivity (ODBC) is a widely accepted application programming interface (API) for database access. It is based on the Call-Level Interface (CLI) specifications from X/Open and ISO/IEC for database APIs and uses Structured Query Language (SQL) as its database access language. And before using this we need to install its driver in the following procedure.
In the Following article we will see this how to install MySQL ODBC driver with complete snapshots :
MySQL ODBC driver installation

Step 1:We should install the ODBC driver MyODBC 2.5 that fits with your Microsoft operating system. You will find all the lastest version drivers and the documentation on the Web:MySQL Downloads.
The following example uses the Connector/ODBC 3.51 that we downloaded in an MSI format.
MyODBC-3.51.11-2-win.msi

ODBC download
Step 2:The next screen will show you the read me info:

next screen
Step 3:The installation proceeds and the files are copied.
Successfully Installed
Step 4: MySQL ODBC driver configuration
The Driver configuration can be done directly from the Microsoft Windows ODBC Data Source Administrator tool.
To access this ODBC Data Source Administrator tool, open the Control Panel, select Adminstrative Tools, the Data Source (ODBC).
The following screen is displayed:
Data Source
If you have installed the MySQL ODBC 3.51 driver you should see it in the driver tab.
Step 5:DSN Settings
What is a DSN: (short for Data Source Name). Data Source Name provides connectivity to a database through an ODBC driver. The DSN contains database name, directory, database driver, UserID, password and other information. Once you create a DSN for a specific database, you can use the DSN in an application to call information from the database.
There are the following three types of DSNs:

  1. System DSN:can be used by anyone with access to the machine. DSN info is stored in the registry.
  2. User DSN:created for a specific user. Also stored in the registry.
  3. File DSN:DSN info is stored in a text file with a .DSN extension.

We choose to create aSystem DSN. We select the System DSN tab and then click next on the Add button, a list of drivers is displayed. We choose the MySQL ODBC driver.
System DSN
Step 6:MySQL ConnectorODBC settings

The Connector ODBC windows setup is displayed.

Connector ODBC windows
Now the new DSN is available in the DSN list.

DSN list

人气教程排行