MySQL Tuning Primer
Modernized MySQL performance tuning primer script for MySQL >= 5.5 <= 5.7
Based on the MySQL performance tuning primer script version 1.6-r1 released on 2011-08-06 by Matthew Montgomery and licenced under the GPLv2.
MySQLTuner.pl
For a much better solution have a look at the MySQL Tuner Perl Script