[client] port=3306 socket=/var/run/mysqld/mysqld.sock [mysqld_safe] socket=/var/run/mysqld/mysqld.sock [mysqld] user=mysql pid-file=/var/run/mysqld/mysqld.pid socket=/var/run/mysqld/mysqld.sock port=3306 basedir=/usr datadir=/var/lib/mysql tmpdir=/tmp lc-messages-dir=/usr/share/mysql log_error=/var/log/mysql/error.log symbolic-links=0 skip-external-locking key_buffer_size = 128M max_allowed_packet = 32M #table_open_cache = 256 #sort_buffer_size = 1M #read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M thread_cache_size = 8 #query_cache_size= 16M query_cache_size = 0 #tuner query_cache_type = 0 #tuner query_cache_limit = 1M #tuner join_buffer_size = 128M #tuner sort_buffer_size = 128M #my initiative read_rnd_buffer_size = 128M #my initiative tmp_table_size = 4GB #tuner max_heap_table_size = 4GB #tuner innodb_buffer_pool_instances = 8 #my initiative https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_buffer_pool_instances recommend to install no more than the physical cores # Should be calculated according to the formula ( innodb_log_file_size * innodb_log_files_in_group should be equals to 1/4 of the buffer pool size) innodb_buffer_pool_size = 48GB # tuner innodb_log_files_in_group = 2 #tuner innodb_log_file_size = 6GB #tuner #innodb_additional_mem_pool_size = 128MB #my initiative - DEPRECATED innodb_log_buffer_size = 1GB #my initiative and can be up to 15% of the size of the logs, A large log buffer enables large transactions to run without the need to write the log to disk before the transactions commit. Thus, if you have transactions that update, insert, or delete many rows, making the log buffer larger saves disk I/O. #innodb_use_native_aio = 0 innodb_file_per_table #The open_files_limit should typically be set to at least 2x-3x #that of table_cache if you have heavy MyISAM usage. #FORMULA : 10 + max_connections + (table_open_cache * 2) table_open_cache = 5000 #tuner open_files_limit = 5000 #tuner #max_connections=200 max_connections=100 max_user_connections=50 wait_timeout=10 interactive_timeout=28800 # for Scripts and Scrapers! (Was 10) long_query_time=5 !includedir /etc/mysql/conf.d/