Installing the MySQL Database

Add the functionality of the most popular open source database server to the underpinnings of your Mac-powered web site.

MySQL is one of the most popular database servers, available for all flavors of Linux, Windows, and now Mac OS X. Due to its immense popularity, you’ll often see web hosts and ISPs offering it as one of the default features for new accounts. It’s a good database to get your feet wet with.

One of the drawbacks to its popularity, however, is the number of ways you can install it. There are various double-clickable packages available, as well as various ways to install and compile from source. We’ll be focusing on the two I found best:

Before we go much further, we have to create a MySQL user. This is the account that our MySQL server will run itself as. (Whereas you may be the morbus user, and the administrative account would be the root user, our MySQL server will run as the mysql user.)

Creating this account is rather simple:

  1. Click on your Apple menu.

  2. Choose System Preferences.

  3. Click the Users Preference panel.

  4. Click New User.

  5. For Name, enter mysql User.

  6. For Short Name, enter mysql.

The Login Picture and Password can be anything you wish. Once you’ve got all the information filled in, click the OK button, and you’ll see the mysql User entry in the User ...

Get Mac OS X Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.