Check Your Mysql Server Performance with MySQLTuner

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability. Within seconds, it will display statistics about your MySQL installation and the areas where it can be improved.

It’s key to remember that MySQLTuner is a script which can assist you with your server, but it is not the solution to a badly performing MySQL server. The best performance gains come from a thorough review of the queries sent to the server, and an evaluation of the MySQL server itself. A qualified developer in your application’s programming or scripting language should be able to work with a MySQL database administrator to find improvements for your server. Once the server and application are optimized well, you may need to consider hardware upgrades to the physical server itself.

This is a really useful tool for helping to optimize MySQL performance.Understanding the various my.cnf variables and how they affect performance can seem really complicated but this tool takes some of the pain away and makes it easier to understand the effects of each variable.It is especially useful to be able to see the global memory usage, memory usage per thread and the maximum possible memory usage – that is really valuable information that is otherwise complex to calculate.

Run MySQLTuner in Debian

Download MySQLTuner using the following command

wget http://mysqltuner.com/mysqltuner.pl

To run the script, simply make it executable and run it:

chmod +x mysqltuner.pl

# ./mysqltuner.pl

Enter your administrative username and password

Output you can see as follows

You need to check mainly recommendations section at the end. It shows which variables you should adjust in the section of your my.cnf (on debian file located at /etc/mysql/my.cnf).

Sponsored Link

4 thoughts on “Check Your Mysql Server Performance with MySQLTuner

  1. There seems to be a minor mistake. The script uses table_open_cache only for version 6 whereas the splitting of table_cache into table_definition_cache and table_open_cache happened in version 5.1.

    So I think Line 779 should read:


    if ($mysqlvermajor eq 6 or
    ($mysqlvermajor eq 5 and $mysqlverminor ge 1) ) {
    push(@adjvars,"table_cache (> ".$myvar{'table_open_cache'}.")"); }

    instead of

    if ($mysqlvermajor eq 6) { ...

  2. Interesting, but how do you connect to a local XAMPP-Installation?

    ./mysqltuner.pl –host localhost/opt/lampp/bin/mysql

    results in

    Unable to find mysqladmin in your $PATH. Is MySQL installed?


  3. Interesting, but how do you connect to a local XAMPP-Installation?

    ./mysqltuner.pl –host localhost/opt/lampp/bin/mysql

    Just drink some poison.

Leave a comment

Your email address will not be published. Required fields are marked *