There are a few handy perl/python/bash scripts out there that can analyze a running MySQL system (via the SHOW STATUS and SHOW VARIABLES queries) and suggest improvements. Here are some of them.
Of course you shouldn’t just blindly accept them, as your environment can vary on what these suggest. However, they do some of the handy math-work for you (like calculating the maximum used memory in MySQL according to your current configuration), it’ll just make things easier for you.
- RackerHackers mysqltuner: offers some good guidelines, easily downloaded via “wget mysqltuner.pl” at the CLI because of handy usage of the .PL TLD.
- At day32.com, there’s a “Tuning Primer Script": it iterates the most used variables and offers confirmation of a good config or improvements for problematic configs.
If there are any other scripts out there that offer a nice overview of a given MySQL configuration I’d love to hear about them!