MySQL: Command Gives Advice on How to Improve or Tune your Database

There is a program that you can install on your Linux system that may help you to fix or improve your MySQL database.

It is called MySQLTuner.

To install:

sudo apt-get install mysqltuner;

After it has installed, type this command, followed by your root/admin access:


 This will output some information about your database, and may make some suggestions like this:

-------- 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
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    table_cache (> 64)
    innodb_buffer_pool_size (>= 138M)

No comments :

Post a Comment