I found the mysqltuner a while back and had been using it on one of my servers sporadically. I suddenly thought... why don't I run it automatically via a cron every week and test the server optimisation. Easy...
sudo -sEnsure that it's in the right place by running it and then optimise the current mysql server and restart it:
wget ht t p : / / m y s q l t u n e r . c o m / m y s q l t u n e r . p l
chmod +x mysqltuner.pl
cp ./mysqltuner.pl to /usr/local/bin/mysqltuner
mysqltunerNow we need to add a cron entry to make it run every week.
joe /etc/mysql/my.cnf
/etc/init.d/mysql restart
crontab -eAnd that's it, saving the crontab file will install it and on the next thursday at 4:43 in the morning, the optimiser will run as root and email the server admin the output.43 4 * * * thur mysqltuner
No comments:
Post a Comment