6

I am working with Excel for Mac Version 16.18 on High Sierra 10.13.6. Installed Connector/ODBC 8.0.12 for macOS, tested the connection to my database with iODBC Data Source Administration (64-Bit) and worked:

iODCB Data Source Administrator

When I try connecting with Excel with the save driver and credentials I get the following error:

IM003 iODBC Driver Manager Specified driver could not be loaded

Same problem with both, Unicode and ANSI drivers.

ttarchala
  • 4,277
  • 2
  • 26
  • 36
M Garcia
  • 331
  • 3
  • 14
  • Does it support the version of excel that you have? Are both appropriately up-to-date? – Solar Mike Oct 19 '18 at 17:14
  • I installed iODBC and the MySQL ODBC driver today, iODBC is verion 3.52.12 and the Connector/ODBC is version 8.0.12, all up-to-date according to Apple Open Source and MySQL sites. – M Garcia Oct 19 '18 at 17:36

2 Answers2

10

I was able to connect to MySQL with Microsoft Excel Version 16.19 by making the following adjustments:

  1. I copied the driver's whole directory /mysql-connector-odbc-8.0.12-macos10.13-x86-64bit to /Library/ODBC (why? see https://bugs.mysql.com/bug.php?id=89931, and Is there a way to get ADODB to work with Excel for Mac 2011?) ; basically the reason for that is the driver gets downloaded to /usr/local and Excel, being sandboxed, cannot access that location.
  2. Updated the file odbc.ini, also located in /Library/ODBC, with the driver's new location.
ttarchala
  • 4,277
  • 2
  • 26
  • 36
M Garcia
  • 331
  • 3
  • 14
  • 2
    This is a great answer, worked for me too when I was almost ready to give up on the idea of using the factory driver, and shell out the €40 for the commercial driver from Actual... – ttarchala Nov 02 '18 at 14:22
  • 1
    The following github issue discusses this problem too and somebody posted a script to fix the installation automatically: https://github.com/openlink/iODBC/issues/29#issuecomment-426790551 – Arik Yavilevich Apr 12 '19 at 15:02
  • I have a new problem after I apply this method. " [MySQL][ODBC 8.0(a) Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (1) ". I guess the reason is Excel in sandbox can not visit /tmp/mysql.sock, but I do not know how to fix it, – Kirby Zhou Sep 05 '20 at 12:48
0

I encountered this as well and I fixed it by changing ALL odbc.ini files to whatever you want change to. I think somehow excel use other odbc.ini files that are not in/Library/ODBC directory.

Karen
  • 1