MySQLTuner is a utility that analyzes the statistics of MySQL and issue recommendations for optimizing MySQL server settings.
First you need to install the utility.
For a more accurate granting of the necessary recommendations to optimize MySQL with MySQLTuner must run for at least 24 hours.
For using the utility, run the command:
Recommendations for optimization you need to make in configuration file of MySQL.
The location of the configuration file my.cnf:
After making changes to the file my.cnf need to restart MySQL server: