DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

How to install mysqltuner on directadmin powered server

| 20:33:34 12.07.2015

A short guide on how to install mysqltuner on directadmin powered server. 

MySQLTuner is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions.

To install the script on your server run this commands as root

wget -O /usr/local/sbin/mysqltuner
chmod 710 /usr/local/sbin/mysqltuner

To run th script after the installation finished, run this:


You will see something similar to:

[root@server ~]# mysqltuner
 >>  MySQLTuner 1.4.6 - Major Hayden 
 >>  Bug reports, feature requests, and downloads at
 >>  Run with '--help' for additional options and output filtering
[OK] Currently running supported MySQL version 5.5.44-MariaDB
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Data in MyISAM tables: 2G (Tables: 3759)
[--] Data in MEMORY tables: 0B (Tables: 1)
[!!] Total fragmented tables: 2

-------- Security Recommendations  -------------------------------------------
[OK] There is no anonymous account in all database users
[OK] All database users have passwords assigned
[!!] There is not basic password file list !

-------- Performance Metrics -------------------------------------------------
[--] Up for: 4s (22 q [5.500 qps], 8 conn, TX: 11K, RX: 1K)
[--] Reads / Writes: 66% / 34%
[--] Binary logging is disabled
[--] Total buffers: 1.4G global + 18.7M per thread (70 max threads)
[OK] Maximum reached memory usage: 2.7G (70% of installed RAM)
[OK] Maximum possible memory usage: 2.7G (70.90% of installed RAM)
[OK] Slow queries: 0% (0/22)
[OK] Highest usage of available connections: 1% (1/70)
[!!] Aborded connections: 12.50%  (1/8)
[!!] Key buffer used: 18.2% (195M used / 1B cache)
[OK] Key buffer size / total MyISAM indexes: 1.0G/377.2M
[!!] Read Key buffer hit rate: 33.3% (30 cached / 20 reads)
[!!] Write Key buffer hit rate: 0.0% (10 cached / 10 writes)
[!!] Query cache efficiency: 0.0% (0 cached / 6 selects)
[OK] Query cache prunes per day: 0
[OK] Temporary tables created on disk: 0% (0 on disk / 2 total)
[OK] Thread cache hit rate: 87% (1 created / 8 connections)
[OK] Table cache hit rate: 1400% (28 open / 2 opened)
[OK] Open file limit used: 0% (25/65K)
[OK] Table locks acquired immediately: 100% (41 immediate / 41 locks)
[!!] Connections aborted: 12%

-------- InnoDB Metrics -----------------------------------------------------
[--] InnoDB is disabled.[!!] InnoDB Storage engine is disabled. InnoDB is the default storage engine

-------- Replication Metrics -------------------------------------------------
[--] No replication setup for this server.

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Reduce or eliminate unclosed connexions and network issues
    Your applications are not closing MySQL connections properly
Variables to adjust:
    key_buffer_size (~ 195M)
    query_cache_limit (> 32M, or use smaller result sets)
[root@server ~]#

For more information please see

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition