Table of Contents

ODBC

ODBC Location

The 32-bit version of the Odbcad32.exe file is located in the

%systemdrive%\Windows\SysWoW64

The 64-bit version of the Odbcad32.exe file is located in the

%systemdrive%\Windows\System32

Automate ODBC Setup

ODBC entries are just registry keys. You can automate the setup of ODBC entries with registry files. This section assumes * You are setting up ODBC on a x64 bit Windows 7 machine. * You are logged into the machine as a domain administrator. * You have already installed the appropriate MySQL ODBC driver (in this case mysql-connector-odbc-3.51.30-win32)

Create a text file on the desktop called odbcsetup.txt and paste in the following text.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\PUT_YOUR_CONNECTION_NAME_HERE]
"Driver"="C:\\Program Files (x86)\\MySQL\\Connector ODBC 3.51\\myodbc3.dll"
"SERVER"="datbase.example.com"
"DATABASE"="testdb"
"PORT"="3306"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources]
"PUT_YOUR_CONNECTION_NAME_HERE"="MySQL ODBC 3.51 Driver"

Rename the file to odbcsetup.reg then double click it to add it to the registry.