# MAMP mysql and C++



## Alerus (Oct 13, 2006)

So, after nearly drilling a screwing through my head attempting to get mysql to install, I stumbled across MAMP. All I had to do was copy it into the Applications folder and it works! I can access its version of mysql, add databases, tables etc..


Great. Now though I would like to be able to interface with the MAMP mysql server through my own c++ code. On the mysql webpage they have a link to mysql++ libraries. Much like everything mysql related I can't seem to get that to install either. Even if I do though, is there something specific I need to do to make code using it talk to the mysql server located in the MAMP folder and not have it searching for something /usr/local?

Pretty much I'm wondering if there is some tutorial I can find that shows me how to install and set up code libraries so that I can write c++ code that talks to my MAMP mysql database.


Any help would be immensely appreciated. Thanks.


----------



## ScottW (Oct 18, 2006)

I use MAMP, but I am not C++ friendly. The MAMP MySQL and PORT settings are all defined in your MAMP configuration, which you can see when you launch MAMP. I believe it is like 8888 or something like that. When you connect to the mysql server you can just target your local machines IP address and port number, unless you taking advantage of the sock file, of which case then you wouldn't have to make any specifications.

Don't think of MAMP as MAMP, just think of it as a MySQL install. That said, MAMP is based off LAMP - Linux Apache MySQL PHP, or MAMP - Mac Apache MySQL PHP. It probably won't have the C++ libraries installed.

If your having trouble installing things, look at using FINK. (http://fink.sourceforge.net/). It will allow you to easily install many packages, including mysql from the command line and add those additional libraries that you need and you can toss MAMP in the trash.


----------



## Alerus (Oct 27, 2006)

Thanks for your help. I've tried Fink before and still have problems with it so I'm not sure. At the moment I've made a work aroudn so I don't need to use the C++ connection, but I'll check into more later. Thanks again!


----------

