Documentation :: Install MySQL on Mac OS X

Under Development


Preface: MySQL for the Newbie

Mac OS X doesn't ship with its own copy of MySQL, nor does Sequel Pro. You will have to install a copy on your local machine, or connect to the MySQL server on a machine somewhere on the Internet.

Most webservers and website packages will include a MySQL installation as part of the services they provide, and usually provide external connection details to allow you to connect to them in an external program like Sequel Pro. (See Web Hosting Providers for a list of hosting options).

Installing MySQL on your own Mac

There are several different ways to install MySQL on Mac OS X. We have provided links to the most common installation methods for Mac OS X.

Using the official .pkg installer

This is the fastest method for installing MySQL on your Mac, but only available for Intel processors. offers a standard MacOS installer package that installs the MySQL Server and several command line utilities. The download also includes a system preference pane for starting/stopping the server. You can optionally install a startup item that starts the MySQL server when your computer starts. The download weighs about 70MB.

MySQL 5.0 for Mac OS X — for MacOS 10.4-10.5, Intel only
MySQL 5.1 for Mac OS X — for MacOS 10.4-10.6, Intel only, recommended Version
MySQL 5.5 beta for Mac OS X — for MacOS 10.4-10.6, Intel only

Install from Source

Installing a copy of MySQL from source is recommended for advanced users only. There are many advantages to compiling your own copy of MySQL, including — speed improvements, system specific customisations (e.g - machines with a small amount of RAM), and it allows you to gain access to cutting edge features/bugfixes before a PKG installer is publicly available.

You must have the Xcode Developer Tools installed. You'll have to download about 20MB of source code.

Installing from source — MySQL
Tutorial for Tiger and Leopard — Hive Logic
Tutorial for Snow Leopard — Hive Logic


MAMP and XAMPP are complete web development packages. They are designed to give developers an easy way to serve up PHP pages using Apache and MySQL right on their Mac. The two packages differ in the selection of utilities they include, but both of them include their own version of Apache, MySQL, and PHP.

Download MAMP/MAMP Pro — for MacOS 10.4-10.6, Intel or PPC
Download XAMPP — for MacOS 10.4-10.6, Intel or PPC

If you use one of these packages, see Connecting to MAMP or XAMPP for further instructions.

Using MacPorts

This method works only if you have MacPorts and the XCode Developer Tools installed. The MySQL download is aproximately 20MB plus dependencies.

With MacPorts you can install the MySQL Server by typing the following command in Terminal:

sudo port install mysql5-server

Afterwards, you must run:

sudo -u _mysql /opt/local/bin/mysql_install_db5

You can start the server with sudo port load mysql5-server and stop it with sudo port unload mysql5-server.

Installing MySQL on a Virtual Private Server (VPS)

Slicehost Articles

Install MySQL on Ubuntu Hardy
Install MySQL on CentOS
Install MySQL on Debian Lenny
Install MySQL on Debian Etch