The MySQL database server is one of the most popular open source databases in the world. Although there is not yet an official package for installing it on the latest version of the Macintosh operating system (Mac OS X 10.7, codenamed Lion), it is possible to install the database on such a system using the package designed for Mac OS X 10.6.
Once you do so, you’ll have the tremendous power of the flexible MySQL relational database available to you for free. It’s an extremely useful database for both developers and system administrators.
Here’s a step-by-step walkthrough of the process.
Time Required: 30 minutes
- Download the 64-bit Apple Disk Image (DMG) installer for Mac OS X 10.6. While the download page says that the installer is for Snow Leopard (Mac OS X 10.6), it will work fine on Lion (Mac OS X 10.7) if you follow this process.
- When the download completes, double-click on the DMG file to mount the disk image. You will see an “Opening…” dialog appear. When it disappears, it will create what appears to be a new disk named mysql-5.5.15-osx10.6-x86_64 on your desktop.
- Double-click the new icon on your desktop. This will open the disk image in Finder and you’ll be able to browse the contents.
- Locate the main MySQL PKG file on the drive. It should be named mysql-5.5.15-osx10.6-x86_64.pkg. Note that there is also another PKG file called MySQLStartupItem.pkg, so make sure you’re selecting the correct one.
- Double-click the MySQL PKG file. The installer will open, showing you the initial page illustrated above. Click the Continue button to begin the guided installation process.
- Click the Continue button to continue past the Important Information screen. Click the Continue button to bypass the License Agreement screen (after thoroughly reading it and consulting with your attorney, of course!). The installer will also make you click Agree on a dialog box indicating that you really, really agree to the terms of the license agreement.
- If you would like to install MySQL in a location other than your primary hard disk, click the Change Install Location button to select your desired location. Otherwise, click Install to begin the installation process.
- Mac OS X will prompt you to enter your password to approve the installation. Go ahead and do so and the installation will begin. It will take a couple of minutes to complete.
- Once you see the message “The installation was successful”, you’re almost done! We have just a few more housekeeping steps to get it running. Click the Close button to exit the installer.
- Return to the Finder window that is open to the MySQL disk image. This time, double-click on the MySQLStartupItem.pkg PKG file. This will configure your system to automatically launch MySQL upon startup.
- Continue through the installation of the startup package item. The guided process is very similar to that used for the main MySQL installation.
- Return to the Finder window that is open to the MySQL disk image. On the third time around, double-click on the MySQL.prefPane item. This will add a MySQL pane to your System Preferences window, making MySQL easier to work with.
- You will be asked whether you wish to install the preferences pane only for yourself or whether you want all computer users to see it. If you choose the second option, you will need to provide an administrator password. Make your selection and click Install to continue.
- You will then see the MySQL preferences pane. You may use this pane to start and stop the MySQL server and also to configure whether MySQL will start automatically.
- Congratulations, you’re finished and can begin working with MySQL!
- Although the installer is labelled as only being compatible with Mac OS X 10.6 (Snow Leopard), it will work fine on Mac OS X 10.7 (Lion).
What You Need
- MySQL installer for 64-bit Mac OS X 10.6
- Macintosh computer running Mac OS X 10.7