Optimizing MySQL is very important to get right the first time. A well tuned MySQL server can perform 2 - 3 x better than a poorly tuned MySQL server. The good news is that there are really only a few settings that ever need to be tuned / changed. This wiki will walk you through the steps for determining if MySQL needs to be tuned, and if it does, how to tune the settings.
Before we even begin to talk about MySQL configuration settings, there is an Elephant in the room that needs to be addressed: Hardware.