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:
t 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.
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