Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

75 lines (66 sloc) 2.18 KB
##############################################################################################
## http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html ##
## https://raw.githubusercontent.com/rackerhacker/MySQLTuner-perl/master/mysqltuner.pl ##
## https://launchpadlibrarian.net/78745738/tuning-primer.sh ##
## yum install mytop / apt-get install mytop ##
##############################################################################################
[mysqld]
### MyISAM #
key_buffer_size = 16M # keep it low if no myisam data
myisam-recover-options = FORCE,BACKUP
### SAFETY #
innodb = force
max_allowed_packet = 250M
max_connect_errors = 100000
bind-address = 127.0.0.1
skip-name-resolve
### LANGUAGE #
#init_connect='SET collation_connection = utf8_unicode_ci'
#init_connect='SET NAMES utf8'
#character-set-server=utf8
#collation-server=utf8_unicode_ci
#skip-character-set-client-handshake
### CACHES AND LIMITS #
back_log = 20
interactive_timeout = 7200
wait_timeout = 7200
net_read_timeout = 120
net_write_timeout = 300
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
join_buffer_size = 2M
tmp_table_size = 128M
max_heap_table_size = 128M
#query_cache_type = 2
#query_cache_size = 128M
max_connections = 150
thread_cache_size = 32
thread_pool_size = 16
open_files_limit = 65535
table_definition_cache = 4000
table_open_cache = 4000
### INNODB_ #
innodb_thread_concurrency = 0
innodb_lock_wait_timeout = 7200
innodb_flush_method = O_DIRECT
innodb_flush_log_at_trx_commit = 2
innodb_log_files_in_group = 2
innodb_log_file_size = 512M
innodb_log_buffer_size = 32M
innodb_file_per_table = 1
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_buffer_pool_instances = 4
innodb_buffer_pool_size = 4G
### LOGGING #
log_error = /var/log/mysqld.log
#log_queries_not_using_indexes = 1
#log_slow_admin_statements = 1
#slow_query_log = 1
#long_query_time = 1
#slow_query_log_file = /var/log/mysql-slow.log
### BINARY LOGGING #
#log_bin = /var/lib//mysql-bin.log
#expire_logs_days = 14
#sync_binlog = 1
You can’t perform that action at this time.