Sanitarium by Zac Dreyer

How to get Wine, Windows MySQL Connector/ODBC and Ubuntu 13.10 to all be friends

Posted by zac on Monday, February 10th, 2014

I recently had the pleasure of trying to get these three to be friends in order to get a Windows database driven app to function correctly. After much research and loads of trial and error, I finally realized that 90% of the posts out there were useless as they all pointed you in the direction of the MySQL Connector for Linux which did not work at all with the Win32 application. After even more research, and pure luck, I finally narrowed it down to the steps below in order to get it working as if it was in a windows environment. This has been tested on both Ubuntu 13.10 32bit and Ubuntu 13.10 64bit.
Let’s get started!
1. Install Ubuntu 13.10 (and update if needed)
Use the default options with “Download updates while installing” ticked. If you plan on using this as a desktop solution, perhaps install the 3rd Party App Support as well, as it would take away a few steps later on.
2. Install Wine 1.7.1 and Winetricks
2.1. Open a terminal window.
2.2. Type in the following commands then hit Enter after each.

sudo add-apt-repository ppa:joe-yasi/yasi
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7 winetricks

3. Install all the extra’s and default fonts using Wintricks CLI
If you are not comfortable with the CLI, you can make use of the Winetricks UI.
3.1. Open a terminal window.
3.2. Type in the following commands then hit Enter after each.

winetricks corefonts eufonts lucida opensymbol tahoma cjkfonts

Although installing the fonts is not required, it is suggested as the windows apps you plan on using with the ODBC install will most likely require these fonts. If the font’s your app requires are not included in the above list, include them or install them later via the Winetricks UI.

winetricks vb6run

Follow instructions as per installer.

winetricks mdac28

Follow instructions as per installer. The 32bit Ubuntu may require the addition install of mdac27 which is a manual process. Just follow the terminal instructions

winetricks msxml4 mfc42 jet40 native_oleaut32

Follow instructions as per installer.
4. To use Windows ODBC drivers, you’ll have to override Wine’s odbccp32, odbc32 and oleaut32 with their native versions, since the Wine versions are currently wired directly to Linux’s unixodbc. You can do this with winecfg under the Libraries tab.
4.1. Open a terminal window.
4.2. Type in the following commands then hit Enter after each.


5. Manually download and install the MySQL ODBC Connector. For this example, I will be installing version 5.1.13 32bit.
5.1. Go to and download the appropriate Windows MSI Installer version.
Once complete,
5.2. Open a terminal window, change directory to the folder where the MSI file is located
5.3. Type in the following commands then hit Enter after each.

wine msiexec /i mysql-connector-odbc-5.1.13-win32.msi

Follow instructions as per installer.
6. Configure the data sources.
6.1. Open a terminal window.
6.2. Type in the following commands then hit Enter after each.

wine control

6.3 Select Data Sources (ODBC).
6.4 Click Add, Select the MySQL ODBC 5.1 Driver from the list and click finish
6.5 Configure Connection Parameters as per your requirements.

And that is it, your Windows MySQL Connector for ODBC should noe be functional!


Posted in: Featured, Linux.

Comments are closed.