http://mysqltuner.com/
MySQLTuner-perl
MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
View the Project on GitHubmajor/MySQLTuner-perl
MySQLTuner-perl
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.
[root@server-mysql ~]# perl mysqltuner.pl --host 127.0.0.1 --user root --password "" --port 3310 >> MySQLTuner 1.6.13 - Major Hayden <major@mhtx.net> >> Bug reports, feature requests, and downloads at http://mysqltuner.com/ >> Run with '--help' for additional options and output filtering [--] Skipped version check for MySQLTuner script [--] Performing tests on 127.0.0.1:3310 [OK] Logged in using credentials passed on the command line [OK] Currently running supported MySQL version 5.6.27 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics ----------------------------------------------------------------- [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA [--] Data in InnoDB tables: 2G (Tables: 33) [OK] Total fragmented tables: 0 -------- Security Recommendations ------------------------------------------------------------------ [!!] User '@localhost' is an anonymous account. [!!] User '@server-mysql' is an anonymous account. [!!] User '@localhost' has no password set. [!!] User '@server-mysql' has no password set. [!!] User 'root@%' has no password set. [!!] User 'root@127.0.0.1' has no password set. [!!] User 'root@::1' has no password set. [!!] User 'root@localhost' has no password set. [!!] User 'root@server-mysql' has no password set. [!!] User '@localhost' has user name as password. [!!] User '@server-mysql' has user name as password. [!!] User 'root@%' hasn't specific host restriction. [!!] There is no basic password file list! -------- CVE Security Recommendations -------------------------------------------------------------- [--] Skipped due to --cvefile option undefined -------- Performance Metrics ----------------------------------------------------------------------- [--] Up for: 3h 24m 11s (1K q [0.160 qps], 389 conn, TX: 3M, RX: 91K) [--] Reads / Writes: 99% / 1% [--] Binary logging is disabled [--] Physical Memory : 1.3G [--] Max MySQL memory : 646.7M [--] Other process memory: 154.7M [--] Total buffers: 73.0M global + 1.1M per thread (151 max threads) [--] P_S Max memory usage: 403M [--] Galera GCache Max memory usage: 0B [OK] Maximum reached memory usage: 480.2M (36.03% of installed RAM) [OK] Maximum possible memory usage: 646.7M (48.52% of installed RAM) [OK] Overall possible memory usage with other process is compatible with memory available [OK] Slow queries: 0% (0/1K) [OK] Highest usage of available connections: 1% (3/151) [OK] Aborted connections: 0.00% (0/389) [OK] Query cache is disabled by default due to mutex contention on multiprocessor machines. [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 14 sorts) [OK] No joins without indexes [OK] Temporary tables created on disk: 5% (320 on disk / 6K total) [OK] Table cache hit rate: 92% (117 open / 127 opened) [OK] Open file limit used: 0% (46/5K) [OK] Table locks acquired immediately: 100% (400 immediate / 400 locks) -------- Performance schema ------------------------------------------------------------------------ [--] Performance schema is enabled. [--] Memory used by P_S: 403.8M [--] Sys schema is installed. -------- ThreadPool Metrics ------------------------------------------------------------------------ [--] ThreadPool stat is disabled. -------- MyISAM Metrics ---------------------------------------------------------------------------- [!!] Key buffer used: 18.3% (1M used / 8M cache) [OK] Key buffer size / total MyISAM indexes: 8.0M/108.0K [OK] Read Key buffer hit rate: 99.5% (574 cached / 3 reads) -------- AriaDB Metrics ---------------------------------------------------------------------------- [--] AriaDB is disabled. -------- InnoDB Metrics ---------------------------------------------------------------------------- [--] InnoDB is enabled. [!!] InnoDB buffer pool / data size: 32.0M/2.8G [!!] InnoDB buffer pool <= 1G and innodb_buffer_pool_instances(!=1). [!!] InnoDB Used buffer: 22.77% (466 used/ 2047 total) [OK] InnoDB Read buffer efficiency: 94.41% (7664 hits/ 8118 total) [!!] InnoDB Write Log efficiency: 16.67% (9 hits/ 54 total) [OK] InnoDB log waits: 0.00% (0 waits / 45 writes) -------- TokuDB Metrics ---------------------------------------------------------------------------- [--] TokuDB is disabled. -------- Galera Metrics ---------------------------------------------------------------------------- [--] Galera is disabled. -------- Replication Metrics ----------------------------------------------------------------------- [--] Galera Synchronous replication: NO [--] No replication slave(s) for this server. [--] This is a standalone server. -------- Recommendations --------------------------------------------------------------------------- General recommendations: Remove Anonymous User accounts - there are 2 anonymous accounts. Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); ) Set up a Secure Password for user@host ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); ) Restrict Host for user@% to user@SpecificDNSorIp MySQL started within last 24 hours - recommendations may be inaccurate Variables to adjust: innodb_buffer_pool_size (>= 2G) if possible. innodb_buffer_pool_instances (=1) [root@server-mysql ~]#