cat /etc/my.cnf # All files in this package is subject to the GPL v2 license # More information is in the COPYING file in the top directory of this package. # Copyright (C) 2011 severalnines.com [MYSQLD] user=mysql basedir=/usr/ datadir=/var/lib/mysql/ socket=/var/lib/mysql/mysql.sock pid-file=mysqld.pid bind-address=0.0.0.0 port=3306 log-error=error.log #log-output=FILE relay-log=relay-bin default-storage-engine=innodb ### INNODB innodb-buffer-pool-size=11489M innodb-flush-log-at-trx_commit=2 innodb-file-per-table=1 ## You may want to tune the below depending on number of cores and disk sub innodb_read_io_threads=8 innodb_write_io_threads=8 #innodb_io_capacity=20000 #innodb_io_capacity_max=40000 innodb-doublewrite=1 innodb_log_file_size=512M innodb-log-files-in-group=2 innodb-buffer-pool-instances=4 innodb-thread-concurrency=0 ## avoid statistics update when doing e.g show tables innodb_stats_on_metadata=0 innodb-file-format=barracuda innodb-flush-method = O_DIRECT innodb_open_files = 2710 #REPLICATION SPECIFIC - GENERAL #server-id must be unique across all mysql servers participating in replication. server-id=1 auto_increment_increment=2 auto_increment_offset=1 #REPLICATION SPECIFIC - MASTER /SLAVE #YOU MAY WANT TO TUNE sync-xxx binlog-format=ROW gtid-mode=ON enforce-gtid-consistency=1 master-info-repository=TABLE relay-log-info-repository=TABLE slave-parallel-workers=0 binlog-checksum=CRC32 master-verify-checksum=1 slave-sql-verify-checksum=1 binlog-rows-query-log_events=1 expire-logs-days=5 sync-binlog=5 sync-master-info=0 sync-relay-log=5 sync-relay-log-info=0 log-bin=binlog log-slave-updates=1 loose-rpl-semi-sync-master-enabled=1 loose-rpl-semi-sync-slave-enabled=1 loose-rpl-semi-sync-master-timeout=10000 relay-log-recovery=1 skip-slave-start=1 skip-name-resolve explicit_defaults_for_timestamp=1 connect-timeout = 1000 max_connect_errors = 9999999 open_files_limit = 102400 #OTHER THINGS, BUFFERS ETC key_buffer_size = 256M max-allowed-packet = 16M sort-buffer-size = 512K read-buffer-size = 256K read-rnd-buffer-size = 512K #thread-cache-size=1024 myisam-sort-buffer_size = 8M memlock=0 sysdate-is-now=1 max-connections=200 thread-cache-size=256 query-cache-type = 2 query-cache-size = 32M table-open_cache=1024 lower-case-table-names=0 [MYSQL] socket=/var/lib/mysql/mysql.sock [client] socket=/var/lib/mysql/mysql.sock [MYSQLD_SAFE] log-error=error.log pid-file=mysqld.pid basedir=/usr/ datadir=/var/lib/mysql/