MySQL Active Report

一如往常..在看訂閱的rss 的時後..
其中這篇
有介紹幾個mysql 的工具..
其中mytop 已經快樂使用中…
另一個就是
MySQL Active Report
看起來挺不錯的..

一樣在ports 裡面也有..
#cd /usr/ports/databases/mysqlard/
#make install clean

裝好後的提示似乎不是很完整

1) Add the ‘mysqlar’ user with USAGE privileges to your mysql server:

$ mysql -u root -p mysql
mysql> GRANT USAGE ON *.* TO mysqlar@localhost;
mysql> FLUSH PRIVILEGES;

2) Add the mysqlard crontab to root’s crontab:

*/5 * * * * /usr/bin/env hourly=1 daily=1 weekly=1 monthly=1 \
/usr/local/bin/mysqlar_graph > /dev/null

3) Add a line like this to your apache’s httpd.conf:

Alias /mysqlar/ /usr/local/www/mysqlard/
<Directory “/usr/local/www/mysqlard”>
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex mysqlar.php
</Directory>

照著ports 上的提示做完後
還有兩個地方要做
1.
cp /usr/local/www/mysqlard/mysqlar.daily /etc/periodic/daily
cp /usr/local/www/mysqlard/mysqlar.weekly /etc/periodic/weekly/
cp /usr/local/www/mysqlard/mysqlar.mounthly /etc/periodic/monthly/
2.
#vim /etc/rc.conf
mysqlard_enable=”YES”
#/usr/local/etc/rc.d/mysqlard start

這樣就大功告成了….

About johnpupu

..........
This entry was posted in MySQL and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word