Tournas Dimitrios

Tuning MySql with MySqlTuner March 8, 2011

mysqltuner is a high-performance MySQL tuning script written in perl that will provide you with a snapshot of a MySQL server’s health. Based on the statistics gathered, specific recommendations will be provided that will increase a MySQL server’s efficiency and performance.It can be very useful tool in many cases, like for ex:

it gives a quick overview on your running mysql configuration and some common sense recommendations.

it computes the total amount of memory needed for the current configuration (assuming all global buffers will be used and the maximum number of threads being connected).

Adjust your MySql config file (/etc/mysql/my.cnf) according to the recommendations. Don’t increase or decrease the values too much because it may have negative impact on the server. If this is a production server, just make minor changes each time and test again a few hours/days later and adjust the values again if needed. It may take a few days to figure out the best values for your server.

Restart MySql after you have made changes to the config file
service mysqld restart