Tuning the performance of MySQL can be a really hard job to do.
There are many thinks to consider and no two servers are identical so there is no universal solution.
Tuning Primer is a script that will help you tune your mysql installation by providing very healthy recommendations based on past mysql records.
For the script to be efficient you must run the mysql server for at least 48 hours.

Installation is extremely simple:

1. Download The Script

wget http://day32.com/MySQL/tuning-primer.sh

2. Change the permissions for the file

chmod 755 tuning-primer.sh

3. Run It

# Apply the sugesttions

How to configure Sundry MySQL Scripts and Docs

Found This Script Works Perfect!