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


November 9th, 2008 at 10:13 am
Thanks, interesting script.
November 14th, 2008 at 3:12 pm
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) { ...
November 23rd, 2008 at 12:12 pm
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?
December 5th, 2008 at 2:01 pm
Interesting, but how do you connect to a local XAMPP-Installation?
./mysqltuner.pl –host localhost/opt/lampp/bin/mysql
Just drink some poison.