This is a very good shell script for fine-tuning MySQL variables.
This script takes information from "SHOW STATUS LIKE..." and "SHOW VARIABLES LIKE..."
to produce sane recomendations for tuning server variables.
It is compatable with all versions of MySQL 3.23 and higher (including 5.1).
# Currently it handles recomendations for the following: Slow Query Log
# Max Connections
# Worker Threads
# Key Buffer
# Query Cache
# Sort Buffer
# Joins
# Temp Tables
# Table (Open & Definition) Cache
# Table Locking
# Table Scans (read_buffer)
# Innodb Status
Script location: http://www.day32.com/MySQL/tuning-primer.sh