MySQLTuner is a script written in perl which based to MySQL logs, it generates some pretty safe suggestions about which variables can be changed in MySQL config file for a little extra performance
First, we download the script and make it executable:
wget https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl
chmod +x mysqltuner.pl
Then we run it:
./mysqltuner.pl