Update MySQLtuner to most recent version


Canagon.com - Website for $499, beautiful premade designs, high-performance hosting on all continents, dedicated support team. Learn more >

MySQL tuner is a one file script, update is easily done manually, I originally installed mysqltuner with sudo apt-get install mysqltuner, but there is no way of updating this script with apt-get, default version in Ubuntu repository is 1.1.0 as of 2013/06 and new version is available.

Go to mysqltuner.com, you will be most probably redirected to https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl as on 2013/06, that is OK, the script will appear on you screen.

The mysqltuner script resides in /usr/bin directory in the file mysqltuner without file suffix. Copy the original file to backup file using cp command and giving it a .old suffix.

$ sudo cp /usr/bin/mysqltuner /usr/bin/mysqltuner.old

Remove the original file.

$ sudo rm /usr/bin/mysqltuner

Create a new file with nano for example, copy a whole content of the script from mysqltuner.com, I used Ctrl + A and pasted it with right mouse button click into a terminal with nano opened.

$ sudo nano /bin/mysqltuner

Give the file right permissions. 

$ sudo chmod 755 /usr/bin/mysqltuner

Done, you have just installed new version of mysqltuner.