O'Reilly logo

Mac OS X Hacks by Rael Dornfest, Kevin Hemenway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required