Just to have a note for myself, here are some steps you need to know to connect your MySQL Database with OpenOffice e.g. for creating form letters.
You need to create a ODBC connection. First step is to install the latest ODBC drivers. For MySQL you will get them diretly from MySQL: http://dev.mysql.com/downloads/connector/odbc/. Just download and click through the installer. If you used the XAMPP or MAMP packages the MySQL socket will not be installed in the /tmp directory. But this is required for most ODBC drivers.
Please check your /tmp directory first. If there is not mysql.sock the aasiest way is to create a link between them. So switch to Terminal and create the link:
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
Otherwise you will get an error like “ Can’t connect to local MySQL server through socket ‚/tmp/mysql.sock‘ (2) „.
Last thing to do for a ODBC connection is to configure your new connection. Therefor you could use the ODBC Administrator from Apple. Also just download and click through the installer. You will get the new application in your System > Utilitys folder.
Under System DNS you should already find your MySQL connector. Mark the entry and configure it. It’s very important to enter the username and the MySQL table.
Now you could create a new database file with OpenOffice ( you should share it through OpenOffice to have easy access from other OO applications ). Just choose „Create connection to existing Database“ and select MySQL via ODBC.
In some cases you might get problems with the standard ODBC connection. In this case there is a special MySQL-plugin for OpenOffice, which allows you diretly to connect to the database. You could download this MySQL connection plugin here. There is also a small How To direct from OpenOffice.
5 thoughts on “ Connect OpenOffice with MAMP/XAMPP MySQL on OS X ”
You are a legend! For 2 hours I have tried to get Actual ODBC to talk to MAMP MySQL – Can find no support anywhere on web for issue until I came across your blog – The one simple piece about the location of mysql.sock fixed the issue! Thanks!
I’m glad i could help someone :)
Incredible blog post bro. This kind of is just a tremendously nicely structured post, just the tips I was hunting to find. Kudos
Wow, this bit of advice about the link to mysql.sock solved my seemingly broken install.
Thanks a million!