MySQL Connector/ODBC Developer Guide
If you have downloaded the zipped DLL package:
Unzip the installation files.
Run the included batch file to perform an installation to the default locations.
Alternatively, install the individual files required for Connector/ODBC operation manually.
The following instructions only work for 32-bit Windows systems. If you have a 64-bit Windows system, use the MSI installer, which installs both the 32-bit and 64-bit drivers to the correct locations.
To install using the batch file:
Unzip the Connector/ODBC zipped DLL package.
Open a command prompt.
Change to the directory created when you unzipped the Connector/ODBC zipped DLL package.
Run Install.bat
:
C:\> Install.bat
This copies the necessary files into the default location, and then registers the Connector/ODBC driver with the Windows ODBC manager.
Changing or adding a new DSN (data source name) may be accomplished using either the GUI, or from the command-line using myodbc-installer.exe.
Although Oracle recommends installing these files in the standard location, you can also copy the files by hand to an alternative location - for example, to run or test different versions of the Connector/ODBC driver on the same machine. To copy the files to a location of your choice, use the following steps:
Unzip the Connector/ODBC zipped DLL package.
Open a command prompt.
Change to the directory created when you unzipped the Connector/ODBC zipped DLL package.
Copy the library files to a suitable directory. The
default location is the default Windows system directory
\Windows\System32
:
For Connector/ODBC 8.x:
C:\>copy lib\myodbc8S.dll \Windows\System32
C:\>copy lib\myodbc8S.lib \Windows\System32
If installing the Unicode-enabled driver: C:\>copy lib\myodbc8w.dll \Windows\System32
C:\>copy lib\myodbc8w.lib \Windows\System32
If installing the ANSI driver: C:\>copy lib\myodbc8a.dll \Windows\System32
C:\>copy lib\myodbc8a.lib \Windows\System32
For Connector/ODBC 5.x:
C:\>copy lib\myodbc5S.dll \Windows\System32
C:\>copy lib\myodbc5S.lib \Windows\System32
If installing the Unicode-enabled driver: C:\>copy lib\myodbc5w.dll \Windows\System32
C:\>copy lib\myodbc5w.lib \Windows\System32
If installing the ANSI driver: C:\>copy lib\myodbc5a.dll \Windows\System32
C:\>copy lib\myodbc5a.lib \Windows\System32
Copy the Connector/ODBC tools. These must be placed in a
directory that is in the system %PATH%
.
The default is to install these into the Windows system
directory \Windows\System32
:
C:\> copy bin\myodbc-installer.exe \Windows\System32
Optionally, copy the help files. For these files to be accessible through the help system, they must be installed in the Windows system directory:
C:\> copy doc\*.hlp \Windows\System32
Finally, register the Connector/ODBC driver with the ODBC manager:
For Connector/ODBC 8.x:
For Unicode-enabled driver: C:\>myodbc-installer -a -d -n "MySQL ODBC 8.0 Driver" \ -t "DRIVER=myodbc8w.dll;SETUP=myodbc8S.dll"
For ANSI driver: C:\>myodbc-installer -a -d -n "MySQL ODBC 8.0 Driver" \ -t "DRIVER=myodbc8a.dll;SETUP=myodbc8S.dll"
For Connector/ODBC 5.3:
For Unicode-enabled driver: C:\>myodbc-installer -a -d -n "MySQL ODBC 5.3 Driver" \ -t "DRIVER=myodbc5w.dll;SETUP=myodbcS.dll"
For ANSI driver: C:\>myodbc-installer -a -d -n "MySQL ODBC 5.3 Driver" \ -t "DRIVER=myodbc5a.dll;SETUP=myodbc5S.dll"
If you installed these files into a non-default location, change the references to the DLL files and command location in the above statement