Code: Select all
#download it into /usr/bin so you can start it from #everywhere
cd /usr/bin
wget http://www.day32.com/MySQL/tuning-primer.sh
#give the proper permissions to run it
chmod 755 tuning-primer.sh
keep your mysql password for the root user ready, if you don't want to enter it every time chose "yes" when it asks "Would you like me to create a ~/.my.cnf file for you?".
when running it you get a nice and colorful output, red color means there should/can be optimized something, the syntax for the optimized settings (if there is no default setting than simply have to be edited in /etc/mysql/my.cnf) can be googled easily.
for the proper calculation of memory usage "bc" have to be installed, should be part of the repositories for any package-based distro.
enjoy!