4.3 Installing Connector/ODBC on Mac OS X

Mac OS X is based on the FreeBSD operating system, and you can normally use the MySQL network port for connecting to MySQL servers on other hosts. Installing the Connector/ODBC driver lets you connect to MySQL databases on any platform through the ODBC interface. If your application requires an ODBC interface, install the Connector/ODBC driver. Applications that require or can use ODBC (and therefore the Connector/ODBC driver) include ColdFusion, Filemaker Pro, 4th Dimension and many other applications.

On Mac OS X, the ODBC Administrator, based on the iODBC manager, provides easy administration of ODBC drivers and configuration, allowing the updates of the underlying iODBC configuration files through a GUI tool. The tool is included in Mac OS X v10.5 and earlier; users of later versions of Mac OS X need to download and install it manually.

There are two ways to install Connector/ODBC on Mac OS X. You can use either the package provided in a compressed tar archive that you manually install, or use a compressed disk image (.dmg) file, which includes an installer.

To install using the compressed tar archive (some of the steps below might require superuser privileges):

  1. Download the compressed tar archive.

  2. Extract the archive:

    shell> tar xvzf mysql-connector-odbc-5.x.y-osx10.z-x86-(32|64)bit.tar.gz
  3. The directory created contains two subdirectories, lib and bin. Copy these to a suitable location such as /usr/local:

    shell> cp bin/* /usr/local/bin
    shell> cp lib/* /usr/local/lib
  4. Finally, register the driver with iODBC using the myodbc-installer tool that was included in the package:

    shell> myodbc-installer -a -d -n "MySQL ODBC 5.2 Driver" -t "Driver=/usr/local/lib/libmyodbc5w.so"

To verify the installed drivers, either use the ODBC Administrator application or the myodbc-installer utility:

shell> myodbc-installer -d -l