Mysql optimization part that is mostly done using mysqltunner application.
mysqltunner is a perl script that can run locally or on a remote server and allows you to optimize some of the values within the mysql configuration file.
When first running the script the current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.
It supports most of the existing Unix versions on the market
Windows is not supported at this time