Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (75 sloc) 2.02 KB
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysql]
no_auto_rehash
#safe-updates
prompt = '\u@<HOSTNAME> mysql>'
[mysqld]
datadir = /var/lib/mysql
port = 3306
socket = /var/lib/mysql/mysql.sock
skip_external_locking
key_buffer = 32M
max_allowed_packet = 8M
table_open_cache = 256
max_connections = 1024
max_connect_errors = 10000
sort_buffer_size = 1M
read_buffer_size = 1M
myisam_sort_buffer_size = 1M
thread_cache = 256
query_cache_size = 0
query_cache_type = 0
tmp_table_size = 64M
max_heap_table_size = 64M
skip_name_resolve
character_set_server = utf8
default_storage_engine = InnoDB
explicit_defaults_for_timestamp
sql_mode = "STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE"
log_bin = mysql-bin
binlog_format = MIXED
binlog_checksum = CRC32 # NONE for back compatibility
master_info_repository = TABLE # FILE for back compatibility
relay_log_info_repository = TABLE # FILE for back compatibility
relay_log = relay-mysql-bin
log_slave_updates
replicate_ignore-db = mysql
expire_logs_days = 60
slow_query_log
long_query_time = 1
log-slow-slave-statements
server-id = <SERVER_ID>
innodb_strict_mode
innodb_data_file_path = ibdata1:10M:autoextend
innodb_data_home_dir = /var/lib/mysql
innodb_file_format = Barracuda
innodb_file_per_table
innodb_buffer_pool_size = 10G
innodb_buffer_pool_instances = 4 # 1 for small
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_thread_concurrency = 0
innodb_flush_log_at_trx_commit = 1
innodb_log_file_size = 128M
innodb_log_buffer_size = 16M
innodb_log_files_in_group = 2
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout = 120
innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
innodb_checksum_algorithm = CRC32 # InnoDB for back compatibility
innodb_io_capacity = 200 # 2000 for ssd
innodb_large_prefix = 1
innodb_print_all_deadlocks =1
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M
read_buffer = 1M
write_buffer = 0M
[mysqld_safe]
open-files-limit = 8192