Logo


Installing mytop on Mac OS 10.5.5 wit XAMPP

Posted in mac, mysql by Dragan on the January 30th, 2009

If you ever done some MySQL profiling you probably used Mytop.

When i transferred to my new job in November, my job was to develop web services and applications using Ajax and other RIA technologies, but all development was done using
Mac computers. Coming from the PC world it was little strange experence in first couple of days and then i get used to it, altrough i still sometimes try to save document using ctrl+s. :)

Mytop require perl to work, and Mac OS X 10.5.5 comes with the perl already installed, but you will probably need DBD::mysql module to run mytop.

Also, standard XAMPP install dir is not in PATH, so you should add it to /etc/paths
here is how my /etc/paths file looks now:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/Applications/xampp/xamppfiles/bin/

Now we can start install procedure:

1)Create a mysql directory in /usr/local:

sudo mkdir /usr/local/mysql

2)Create symlinks to the mysql

sudo ln -s /Applications/xampp/xamppfiles/lib/mysql/ lib

For the next step you should have xampp developer package
http://www.apachefriends.org/en/xampp-macosx.html

sudo ln -s /Applications/xampp/xamppfiles/include include

sudo ln -s /Applications/xampp/xamppfiles/var/mysql/mysql.sock /tmp/mysql.sock

3) Now install DBD::mysql module (if you don't have one)

perl -MCPAN -e 'install DBD::mysql'

4) Now extract and install mytop


tar -zxvf mytop-.tar.gz
cd mytop-
perl Makefile.PL
make
sudo make install

and that's it..

you should be able to run mytop now.


All Rights Reserved, Copyright © 2007 Dragan Bajcic.
YourTree | Dragan@YourTree | Web Development and Consulting | rent a car srbija