Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the easiest way to run MySQL for development purposes on the Mac?

Ideal would be a server embedded in a Mac application, that starts when you press a start button, and stops when you quit the app.

I do not need a background service running, I do not want to have to be an admin user to install or run, I do not want to see a command line, I do not want to edit configuration files, I do not want files spread out all over the disk (everything should be in the App bundle and the Documents folder).

share|improve this question
up vote 6 down vote accepted

MAMP may work for you.

share|improve this answer
Works for me... – Garry Jun 7 '10 at 11:55
Yes, excellent distribution. Thanks. – Thilo Jun 8 '10 at 2:54
Okay, that was easy. Unfortunately, I also need DBD::Mysql, and it seems that does not build against MAMP. I think I am going VirtualBox/Linux :-( – Thilo Jun 8 '10 at 9:59
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Ivo Flipse Jul 15 '12 at 19:15

I do not use MySQL, but I believe you should use libmysqld:

The embedded MySQL server library makes it possible to run a full-featured MySQL server inside a client application. The main benefits are increased speed and more simple management for embedded applications.

The embedded server library is based on the client/server version of MySQL, which is written in C/C++. Consequently, the embedded server also is written in C/C++. There is no embedded server available in other languages.

The API is identical for the embedded MySQL version and the client/server version.

The embedded MySQL server library is NOT part of MySQL 5.0. It is part of previous editions and will be included in future versions, starting with MySQL 5.1.

share|improve this answer
sorry, misunderstanding. I do not want to embed MySQL in my app. It will use regular network connections to talk to a MySQL server. I just want to have a hassle-free MySQL server on my development machine. – Thilo Jun 7 '10 at 9:36
Actually, in my case, I am developing a Perl program, using DBD::SQLite, and when it is done, switch to MySQL. If someone could package libmysqld into DBD::libmysql, that would do the trick ;-) – Thilo Jun 7 '10 at 9:37
In that case, you might be interested in the DBD::mysql, found at – harrymc Jun 7 '10 at 10:47

MAMP seems to be the easiest way to go for a MySQL server.

Unfortunately, it does not have Perl support, and building the Perl client on the Mac is a pain (maybe macports is the solution here), so I went with VirtualBox and Turnkey Linux's MySQL appliance (and put the Perl client inside there as well). Not too huge a download, starts fast, database and nice admin pages (phpMyAdmin) preconfigured.

share|improve this answer
Perl's already installed on Mac OS X. I successfully used MAMP for some MediaWiki related work, it was very handy. – chrish Jun 17 '10 at 14:18
Perl is installed, but not DBD::mysql – Thilo Jun 21 '10 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .