If you have downloaded the zipped DLL package:
Unzip the installation files to the location you want it installed.
Run the included batch file to perform an installation from the current directory and registers the ODBC driver.
Alternatively to the batch file, install the individual files required for Connector/ODBC operation manually.
Optionally install debug related files that are bundled in a different Zip file.
To install using the batch file:
Unzip the Connector/ODBC zipped Connector/ODBC package to the desired installation directory. For example, to
C:\Program Files\MySQL\Connector ODBC 9.1\
.NoteMultiple Zip files are available: 32-bit and 64-bit, and (as of 8.0.31) a separate Debug Zip file that includes PDB files and unit tests.
Open a command prompt (with Admin privileges) and change the location to that directory.
Run
Install.bat
to register the Connector/ODBC driver with the Windows ODBC manager for both the ANSI and Unicode versions. Output is similar to:cd C:\Program Files\MySQL\Connector ODBC 9.1\ Install.bat Registering Unicode driver Checking if "MySQL ODBC 9.1 Unicode Driver" is not already registered Registering "MySQL ODBC 9.1 Unicode Driver" Success: Usage count is 1 Registering ANSI driver Checking if "MySQL ODBC 9.1 ANSI Driver" is not already registered Registering "MySQL ODBC 9.1 ANSI Driver" Success: Usage count is 1
NoteInstall.bat
assumes the default naming scheme but optionally accepts a custom name as the first parameter. For example, "Install.bat Fun" yields "Fun Unicode" and "Fun ANSI" as the driver names.Optionally use
myodbc-installer.exe
to list the registered drivers, for example:cd C:\Program Files\MySQL\Connector ODBC 9.1\bin myodbc-installer -d -l SQL Server MySQL ODBC 9.1 Unicode Driver MySQL ODBC 9.1 ANSI Driver
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.
Using Install.bat
is optional, directly
using myodbc-installer.exe
is an
alternative option to register drivers. For example:
# For Unicode-enabled driver:
myodbc-installer -a -d -n "MySQL ODBC 9.1 Unicode Driver" -t "DRIVER=myodbc9w.dll;SETUP=myodbc9S.dll"
# For ANSI driver:
myodbc-installer -a -d -n "MySQL ODBC 9.1 ANSI Driver" -t "DRIVER=myodbc9a.dll;SETUP=myodbc9S.dll"