Debian Admin

Debian/Ubuntu Linux System Administration Tutorials,Howtos,Tips

  • RSS Subscribe

    subscribe to the Debian Admin RSS feed
  • Sponsors



  • Categories

  • Sponsors

  • Support DebianAdmin

    Amount $:
    Website(Optional):


  • Meta

  • Archives



Check Your Mysql Server Performance with MySQLTuner

Posted by Admin on November 9th, 2008

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

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).

  • Share/Bookmark

Random Posts

4 Responses to “Check Your Mysql Server Performance with MySQLTuner”

  1. Andrei Says:

    Thanks, interesting script.

  2. Pierre Says:

    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) { ...

  3. flyingfischer Says:

    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?

  4. lor Says:


    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 Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>