Skip to content

Instantly share code, notes, and snippets.

@ndelitski
Last active February 27, 2016 14:38
Show Gist options
  • Save ndelitski/7c6eab31f48c9fe2b0da to your computer and use it in GitHub Desktop.
Save ndelitski/7c6eab31f48c9fe2b0da to your computer and use it in GitHub Desktop.
configs
[client]
port = 3306
socket = /tmp/mysql.sock
[mysql]
prompt = '\\u@\\h [\\d] > '
default_character_set = utf8_general_ci
safe_updates
show_warnings
connect_timeout = 5
pager = 'less -R'
[mysqld]
port = 3306
bind-address = 0.0.0.0
socket = /tmp/mysql.sock
datadir = /var/lib/mysql
tmpdir = /tmp
character_set_server = utf8_general_ci
#lower_case_table_names = 1
skip_name_resolve
skip_external_locking
default_storage_engine = InnoDB
transaction_isolation = READ-COMMITTED
#core_file
#read_only
sql_mode = TRADITIONAL,NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY
## network
max_allowed_packet = 16M
max_connections = 1000
max_connect_errors = 10000
wait_timeout = 60
slave_net_timeout = 60
## cache size
table_open_cache = 2000
thread_cache_size = 100
query_cache_type = 0
query_cache_size = 0
binlog_cache_size = 16M
max_heap_table_size = 128M
tmp_table_size = 128M
## log
#log_error = mysql-error.log
#general_log = 1
#general_log_file = mysql.log
## binary log
#server_id = <%= server_id %>
#log_bin = mysql-bin
#log_slave_updates
#max_binlog_size = 512M
#binlog_format = ROW
#expire_logs_days = 4
#sync_binlog = 1
#relay_log = mysql-relay-bin
#report_host = <%= report_host %>
## slow query log
#slow_query_log
#slow_query_log_file = mysql-slow.log
#log_slow_admin_statements
#log_slow_slave_statements
#long_query_time = 0.1
## innodb
innodb_strict_mode
innodb_buffer_pool_size = 2G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_buffer_size = 16M
innodb_log_file_size = 512M
innodb_doublewrite = 0
innodb_read_io_threads = 8
innodb_write_io_threads = 8
innodb_lock_wait_timeout = 5
innodb_support_xa = 1
innodb_autoinc_lock_mode = 2
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_file_per_table
innodb_file_format = Barracuda
innodb_print_all_deadlocks
innodb_large_prefix = 1
## [mysqld-5.6] or [mysqld-5.7]
loose_performance_schema = OFF
loose_explicit_defaults_for_timestamp
loose_table_open_cache_instances = 8
## innodb
loose_innodb_buffer_pool_dump_at_shutdown = 1
loose_innodb_buffer_pool_load_at_startup = 1
loose_innodb_monitor_enable = all
## innodb for ssd
innodb_flush_neighbors = 0
innodb_random_read_ahead = 0
innodb_read_ahead_threshold = 0
innodb_io_capacity = 2000
innodb_io_capacity_max = 2000
innodb_lru_scan_depth = 2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment