[ MYSQL ] Optimization Util: MysqlTuner

Let’s download mysqltuner:

wget http://mysqltuner.pl/ -O mysqltuner.pl

And starting it:

perl mysqltuner.pl

After we will get some recomendations, like:
-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Enable the slow query log to troubleshoot bad queries
Reduce or eliminate unclosed connections and network issues
Reduce your SELECT DISTINCT queries which have no LIMIT clause
Performance shouldn't be activated for MySQL and MariaDB 5.5 and lower version
Consider installing Sys schema from https://github.com/mysql/mysql-sys
Variables to adjust:
query_cache_size (=0)
query_cache_type (=0)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
performance_schema = OFF disable PFS
innodb_file_per_table=ON
innodb_log_file_size * innodb_log_files_in_group should be equal to 1/4 of buffer pool size (=64M) if possible.

After opening file /etc/mysql/my.cnf and change some settings:

nano /etc/mysql/my.cnf

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *