Installing and Configuring MySQL 32 bit ODBC driver on a 64 bit Operating System.

Complexity: Recently i was working on a C# Project that was 32-bit application. My Machine is 64-bit so i was facing problem while using MySQL ODBC 64-Bit Driver with my application there’s type mismatch and project was giving runtime error. I tried to use 32 bit driver on my PC and managed to get application working and get rid of “architecture mismatch error” that’s common while using it, after following the below solution.

What happens is that you have a 64 bit operating system, which usually comes with a more modern equipment, and specially a 64 bit server OS, which is most likely to be the case, and you need to install an ODBC driver that would work with a 32 bit application.

If you install a 64 bit ODBC driver, it will be listed and configurable in “ODBC Data Source Administrator” (StartControl PanelAll Control Panel ItemsAdministrative ToolsData Source (ODBC)), but it will not be able to work with 32 bit application.

On the other hand, if you try to install the 32 bit driver, the system will not recognise it, and it will not appear in your default Data Sources (ODBC) inside the control panel, so you will not be able to configure it and connect to MySQL.


THERE IS A SOLUTION TO THIS PROBLEM – In many places you will read that this is IMPOSSIBLE – WHICH IS NOT TRUE. What you need to do is the following:

    • Download and install the 32 bit MySQL driver, regardless of the fact that you are using a 64 bit OS.It will install the files in the following place (path):C:Program Files (x86)MySQLConnector ODBC 5.1
    • Make sure that you are installing ODBC Driver Version 5.1, because for 5.2 it doesn’t work properly. Use this link: http://dev.mysql.com/downloads/connector/odbc/5.1.html
    • Instead of following the usual path via the Control Panel (Control PanelAll Control Panel ItemsAdministrative ToolsData Sources (ODBC) ) , where the 32 bit driver will not be recognised, YOU NEED TO FIND AND USE THE FOLLOWING PATH:
      C:WindowsSysWOW64odbcad32.exe
      .

mysql-odbc-instructions-1

Open odbcad32.exe and you will find 32-bit driver there. Use that to create DSN or whatever your objective is.

mysql-odbc-instructions-2

Here you will be able to see your 32 bit ODBC driver and configure it to connect with the MySQL database, in the same way as you would do on a 32 bit system. That was all about installing and configuring MySQL ODBC 32-bit driver on 64-bit PC. Stay tuned for my next post on using MySQL ODBC driver with C# Application.

Please encourage me by Sharing this blogpost.

Leave a Reply