I’m trying to get ODBC to work on MAMP. I have tried many suggestions and solutions including those already on stackoverflow:
None are successful so far.
This is the latest I tried.
I downloaded the latest ODBC connector:
Installed it with the OSX DMG
I than added the driver in iODBC
I keep getting this message:
Specific driver could not be loaded
No suitable image found. Did find: /usr/local/lib/libmyodbc5w.so mach-o, but wrong architecture
Looks like you are right about the 32-bit only of iODBC.
You will need to download the Source, and compile from scratch. You will also need to download XCode through the AppStore first, so you have access to gcc and cmake.
Source Code Link: http://www.iodbc.org/downloads/iODBC/libiodbc-3.52.7.tar.gz
Note: From the CLI you can run the
lipo -detailed_info /path/to/binary command. This would give you detailed information about a specified binary.
I struggled with this problem for MANY hours (I messed with msql/php, and for years ago, so I consider myself currently a total newbie!). My problem was I couldn’t connect my PC to my new online server using ODBC (server was a mac mini running mavericks, trying to connect from a windows machine in my office via mysql odic connector). I finally found a solution that works. here is my situation and environment:
I am converting from Access to MySql/PHP. Application configured as front-end / back-end.
Put my server online so I could export my access back end tables to MYSQL. (some were online at another server, some were on my internal windows 2003 server. ) planning to change front end to php from access vba.
Installed ODBC Administrator on mac mini (mavericks) per google searches.
Went to drivers tab in ODBC Administrator. Set my drivers from USER to SYSTEM in the pulldown on the drivers page. This opened the drivers to appear on the SYSTEM tab of ODBC Administrator (prior to this, the drivers did not appear on the SYSTEM tab of ODBC Administrator).
Added the DSN, the USER, the PORT, and the PASSWORD variables.
I then went to my MAMP application that was running on the Mac. I clicked on [FILE], [EDIT] [TEMPLATE] [my.cnf]. This opened the configuration file. There is a warning – if this gets polluted, it screws up the entire MAMP app.
I made the following change (Inserted a comment above the change).
the bind address was just commented out. 9-5-14
bind-address = 127.0.0.1
This change does not tie MAMP to the localhost (I believe).
- I kept scrolling through the file. I also made the next change, and then saved the .cnf file:
Just commented out the next line. Trying to get odbc to work. 9-5-14
This change I believe tells MAMP to allow remote connections.
- On PC, under Data Sources, System DSN tab, using MYSQL ODBC 5.1 driver, I set the datasource name, I set the URL of the online server (which was registered with internic), I set the port, and I entered the User and password to be the same KEYS I set in the ODBC System DSN I added on the Mac server. Then, I pulled down the database tab, and miraculously – the databases in my mac server appeared!
Hope this is helpful to another newbie! I literally worked WAY too many hours trying to find a solution, and it wound up being pretty easy once I lucked into the answer!