Whatterz


Installing MySQL on Mac OSX 10.6 (Snow Leopard)

by Simon. Average Reading Time: less than a minute.

If you’re comfortable with installing applications on your Mac and are reasonably familiar with MySQL, installing MySQL on Snow Leopard should be relatively simple.

  1. Download the Mac OSX disk image from the MySQL website:

    http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg

    I used the mysql-5.1.42-osx10.5-x86_64.dmg disk image, which seems to work fine. The image contains 4 files including a ReadMe file.

  2. Install the following packages found in the disk image to the default location and with the default options:
    mysql-5.1.42-osx10.5-x86_64.pkg
    MySQLStartupItem.pkg
  3. Install the following profile found in the disk image to the default location and with the default options:
    MySQL.prefPanel
  4. Start the MySQL service in the System Preferences panel and check the Automatically Start the MySQL Service on Startup option.

That is all you need to do. However, if you’re working with PHP, you will need to correctly reference the mysql.sock file in your php.ini file. To do this, find the following line and ensure the reference is correct:

mysql.default_socket = /tmp/mysql.sock

(Remember to restart Apache if you make changes to your php.ini file.)

This article has been tagged

, , , , ,

Other articles I recommend

Configuring PHP with Apache on Windows Vista

Installing PHP with Apache on Windows Vista is a relatively simple task until you try an configure the settings in php.ini. Problems can occur and stem from the fact that when you install PHP and edit the php.ini file, you need to not only be logged in as Administrator, but run the installer and Notepad text editor as Administrator. The php.ini file also needs to be located in the Windows directory.

PHP.ini Permission Problems on Windows Vista

Installing PHP is a relatively simple task one would think. Indeed it is simple, but configuring the php.ini isn’t; at least not so on Windows Vista! It is infuriating when such a relatively simple task is made inordinately complicated because of the nuances of Vista permissions. What started out as a 5 minute task took a significant number of hours searching for a suitable answer on Google, and not only by myself.

Setting up PHP on Mac OSX 10.6 (Snow Leopard)

Since Apple launched Mac OS X 10.5 (Leopard), PHP has been installed by default, albeit disabled. Here is a quick run through of what you need to do to get it up and running.

  • A friend of mine just had great luck using http://mxcl.github.com/homebrew/ for mysql, etc. I plan to try it when the next macbook pro is available.

  • A friend of mine just had great luck using http://mxcl.github.com/homebrew/ for mysql, etc. I plan to try it when the next macbook pro is available.

  • Simon

    Thankyou for your simple and easy to follow guide. Appreciated.

  • Janusz

    That helped. Thanks!

     

  • Siva Puvvada

    This helped. Thanks

  • Rob

    Simon,

    Thank you so much for keeping it simple and to the point, I was missing the GUI component.
    Your article made the process quick and painless.

    Rob from San Francisco.

  • Ngo Hoang Lien

    good

  • Alex

    Also needPATH=$PATH:$HOME/bin:/usr/local/mysql/binto use mysql from console

  • Munim Anees

    Good guide. Great! thanks

  • Liam

    Great article, works on my ’07 Mac Pro.