Twitter Updates

Sunday, 16 November 2008

Install mysql on Mac OS X 10.5

I have trying out some ruby on rails which requires a database, the most common for rails is mysql.

Itried the mac ports install
$sudo port -d selfupdate
$port search mysql
$sudo port install mysql5

but that did not seem to work ie '$which mysql' returns no results

Note: checking out the contents of /opt/local/bin I notice that mysql5 and mysqladmin5 are there. so using these program names it might have all been working!

Apple have this guide

The following way seemed to work for me:
Download the Mac OS X Package from Requires a free registration but led me to this link in the end

just download mount the .dmg (by double clicking on it) then install both .pkg inside (by double clicking on it).

dont forget to add this to your path
$vim ~/.bashrc
Paste in the follwoing
#Add path for mysql package
export PATH=$PATH:/usr/local/mysql/bin/

now '$which mysql' and '$which mysqladmin' should return results

NB: I had to reboot to get the mysql demons (the server) to start, but I am sure there is a quicker way of starting the server up after the first install.

No comments: