Here are some basic, but high impact ways to optimize MySQL for Drupal (there are much more sophisticated and expensive ways to speed up your database of course):

Drupal Mysql Logo Image

An appropriate amount of "query_cache" is believed to improve MySQL performance at the expense of available memory. "Appropriate" will vary widely with usage and "performance" on a live site can be elusive. On Ubuntu, the defaults are modest but "work".

I've been working on the performance of my Drupal site and thought I'd share my results to date in case they might help someone else. My baseline performance using out-of-the-box settings was around 28 requests per second, and the end result is a rate of 68 requests per second.

Just edit .htaccess file in your Drupal root directory. For example, I added the following two lines.

php_value post_max_size 100M
php_value upload_max_filesize 100M
php_value memory_limit 96M (this is vital for Drupal 6)

# PHP 4, Apache 2.

Analysis and Recommendations

* TOTAL_HTML - Congratulations, the total number of HTML files on this page (including the main HTML file) is 1 which most browsers can multithread. Minimizing HTTP requests is key for web site optimization.