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.

4 Responses to 'Installing mytop on Mac OS 10.5.5 wit XAMPP'

Subscribe to comments with RSS or TrackBack to 'Installing mytop on Mac OS 10.5.5 wit XAMPP'.

  1. fawzi said,

    on March 18th, 2009 at 11:52 pm

    Hello there..

    i am having a reall hard time trying to install DBD-mysql on my xampp 0.7.

    i thought i will try your method here, since nothing i have tried so far gets me there.

    When you create your links Ln....., what dir are you in then? are you in /usr/local, or /Applications/xampp, or ?????

  2. fawzi said,

    on March 18th, 2009 at 11:55 pm

    ok, sorry.. you were in /usr/local.
    but i do have a lib in there already, and it is not a link.
    it is filled with many .dy files, which i do not know what they do

    any ideas?

  3. fawzi said,

    on March 19th, 2009 at 12:14 am

    i tried your command:
    perl -MCPAN -e 'install DBD::mysql'

    and got a huge error dump, here is the first bit of it. I think i need to have the inlude and lib directoried for mysql. am i correct?:

    Writing Makefile for DBD::mysql
    cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
    cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
    cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
    cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
    cc -c -I/Applications/xampp/xamppfiles/lib/perl5/site_perl/5.10.0/darwin-2level/auto/DBI -I/Applications/xampp/xamppfiles/include/mysql -I/Applications/xampp/xamppfiles/include -L/Applications/xampp/xamppfiles/lib -arch i386 -arch ppc -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i386 -arch ppc -fno-strict-aliasing -pipe -I/usr/local/include -O3 -DVERSION=\"4.010\" -DXS_VERSION=\"4.010\" "-I/Applications/xampp/xamppfiles/lib/perl5/5.10.0/darwin-2level/CORE" dbdimp.c
    In file included from dbdimp.c:20:
    dbdimp.h:22:49: error: mysql.h: No such file or directory
    dbdimp.h:23:45: error: mysqld_error.h: No such file or directory
    dbdimp.h:25:49: error: errmsg.h: No such file or directory
    In file included from dbdimp.c:20:

  4. Dragan said,

    on March 19th, 2009 at 9:31 am

    Hmmm.. really don't know... instructions above worked for me and few other people as well. You should try some perl mailing list or forum. There should be people competent to give you right answer.

Leave a Reply (English only)


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