January 24, 2011
I had a hard time getting the MySQL 5.1.8 ODBC driver to work with Excel 2011 on my work MacBook. I'm running OSX 10.6 (Snow Leopard), but this issue seems to go back some ways.
Apparently, the problem has to do with Microsoft Query being a native PPC 32 bit app, while Excel 2011 is an Intel native 32 bit app.
The solution was to use lipo to combine the distinct Mac Intel 32-bit ODBC driver with the PPC 32 bit driver.
To do this, download and extract the myodbc connector drivers from the MySQL site in tar.gz format. You need both the intel-x86-32bit and the ppc-32bit downloads. Extract them both next to each other in a tmp dir (/Users/drew/tmp, or whatever). Then, from your tmp dir, use lipo to make a multi-arch version. (To widen out the text area so you can see the full command, use my "hide panel" button to hide the right column of this page. Also, remember that backslash means "continue command on next line."):
$ lipo mysql-connector-odbc-5.1.8-osx10.5-powerpc-32bit/lib/libmyodbc5-5.1.8.so \ mysql-connector-odbc-5.1.8-osx10.6-x86-32bit/lib/libmyodbc5-5.1.8.so \ -output ./libmyodbc5-5.1.8.so \ -create
This will create a new libmyodbc5-5.1.8.so in the current directory with both architectures supported. You can test this by running:
$ lipo ./libmyodbc5-5.1.8.so -info
You can then sudo copy this to /usr/local/lib on top of any other libmyodbc5-*.so.
Also, be sure that /usr/local/lib/libmyodbc5.so a symlink to the new file. I had an actual file there rather than a symlink and it caused some additional pain.
tags:excel, mac, mysql, odbc, office 2011, snow leopard
Comments are currently closed.
posted by GenÃs on Apr 04, 2011
Thanks a lot! This is really useful!! To create a symlink in the terminal: sudo ln -s /usr/local/lib/myodbc5-5.1.8.so /usr/local/lib/myodbc5.so