Tuning MySql with MySqlTuner March 8, 2011Posted by Tournas Dimitrios in Uncategorized.
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).
- very simple usage: you just have to download and run it.
- If EPEL is on the repository list of CentOs 5.x , yum will automate the installation process .
yum install mysqltuner
== OR ==
chmod +x mysqltuner.pl
- Run the script :
mysqltuner (yum installation)
./mysqltuner.pl (wget installation)
- Input your MySql administrative login and password
Please enter your MySQL administrative login:
Please enter your MySQL administrative password:
- 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
Here is an sample of my development environment server .