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
http://developer.apple.com/internet/opensource/osdb.html
The following way seemed to work for me:
Download the Mac OS X Package from http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg. Requires a free registration but led me to this link in the end
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.67-osx10.5-x86_64.dmg/from/http://mirrors.ukfast.co.uk/sites/ftp.mysql.com/
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.
Twitter Updates
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment