April 17, 2014

Resolving MySQL ODBC "architecture mismatch" Error

If you attempt to use ODBC to run a MySQL application and run into the following error:

[Microsoft][ODBC Driver Manager] The specified DSN contains an 
architecture mismatch between the Driver and Application

This means there is a 64-bit versus 32-bit mismatch. Most likely, you're running 64-bit Windows, as well as 64-bit MySQL ODBC connector, but the application is 32-bit. If this is the case, you will also need to install the 32-bit MySQL ODBC connector, and then create the connection from the 32-bit ODBC. odbcad32.exe is the file to create the connections. Both 64-bit and 32-bit files have the same name, just differing locations. This is the default location for the 64-bit ODBC:

C:\Windows\System32\odbcad32.exe

This is the default location for the 32-bit ODBC:

C:\Windows\SysWOW64\odbcad32.exe

And should you need to install MySQL ODBC, there are good instructions here (both for MSI and Manual installs). Hope this helps.

About Chris Calender

Chris Calender is a Technical Support Manager with MariaDB. Prior to joining SkySQL (which later merged with MariaDB) he was a Principal Support Engineer at MySQL/Sun/Oracle, as well as Support Manager of Americas East. Before that, he worked as a MySQL DBA and developer for numerous Fortune 500 Companies, including Clear Channel, Western & Southern, and Cincinnati Bell. Chris has both Bachelor's and Master's degrees in Computer Science, from Miami University and the University of Cincinnati, respectively. He has been using MySQL since 3.23 days. Having deployed well into the tens of thousands of database servers, he is an expert at deployment, managing such instances, server tuning and query tuning. In the past, he devised a revolutionary technique for recovering corrupted, and what was then unrecoverable data, thus saving some companies completely, as well as setting himself apart in the MySQL/MariaDB ecosystem as such as expert. He has also been very willing to share his knowledge as he has been one of the most prolific bloggers in the MySQL Ecosystem (see planet.mysql.com), ranking on the "Top 20 Authors" list for much of the past 10 years, and even holding the #1 spot numerous times.

Read all posts by Chris Calender