10.1.1 ODBC Libraries

Note

This section may be skipped when using a MySQL Workbench binary that is provided by Oracle.

An ODBC Driver Manager library must be present. Both Windows and macOS provide one.

Linux

iODBC: MySQL Workbench binaries provided by Oracle already include iODBC and no additional action is required. If you compile it yourself, you must install iODBC or unixODBC. iODBC is recommended. You can use the iODBC library provided by your distribution by installing the libiodbc2 package on Debian based systems, or libiodbc on RPM based systems.

pyodbc: is the Python module used by MySQL Workbench to interface with ODBC, and may be used to migrate ODBC compliant databases such as PostgreSQL and DB2. In Windows and macOS, it is included with Workbench. In Linux, binaries provided by Oracle also include pyodbc.

If you're using a self-compiled binary, make sure you have the latest version, and that it is compiled against the ODBC manager library that you chose, whether it is iODBC or unixODBC. As of version 3.0.6, pyodbc will compile against unixODBC by default. If you are compiling against iODBC then you must perform the following steps:

  1. For compiling, make sure you have the iODBC headers installed. For Linux, the name depends on your system's package manager but common names are libiodbc-devel (RPM based systems) or libiodbc2-dev (Debian based systems). For macOS, the headers come with the system and no additional action is required for this step.

  2. In the pyodbc source directory, edit the setup.py file and around line 157, replace the following line: settings['libraries'].append('odbc') with settings['libraries'].append('iodbc')

  3. Execute the following command as the root user: CFLAGS=`iodbc-config --cflags` LDFLAGS=`iodbc-config --libs` python setup.py install