Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 1 | # All files in this package is subject to the GPL v2 license |
| 2 | # More information is in the COPYING file in the top directory of this package. |
| 3 | # Copyright (C) 2011 severalnines.com |
| 4 | {%- if pillar.galera.master is defined %} |
| 5 | {%- from "galera/map.jinja" import master with context %} |
| 6 | {%- set service = master %} |
| 7 | {%- endif %} |
| 8 | {%- if pillar.galera.slave is defined %} |
| 9 | {%- from "galera/map.jinja" import slave with context %} |
| 10 | {%- set service = slave %} |
| 11 | {%- endif %} |
| 12 | [MYSQLD] |
| 13 | user=mysql |
| 14 | basedir=/usr/ |
| 15 | datadir=/var/lib/mysql |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame^] | 16 | socket={{ service.socket }} |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 17 | pid_file=mysqld.pid |
| 18 | port=3306 |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 19 | log_error={{ service.log_file }} |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 20 | log_warnings=2 |
| 21 | #log_output=FILE |
| 22 | ### INNODB OPTIONS |
| 23 | innodb_buffer_pool_size=9211M |
| 24 | innodb_flush_log_at_trx_commit=2 |
| 25 | innodb_file_per_table=1 |
| 26 | innodb_data_file_path = ibdata1:100M:autoextend |
| 27 | ## You may want to tune the below depending on number of cores and disk sub |
| 28 | innodb_read_io_threads=4 |
| 29 | innodb_write_io_threads=4 |
| 30 | innodb_io_capacity=200 |
| 31 | innodb_doublewrite=1 |
| 32 | innodb_log_file_size=1024M |
| 33 | innodb_log_buffer_size=96M |
| 34 | innodb_buffer_pool_instances=8 |
| 35 | innodb_log_files_in_group=2 |
| 36 | innodb_thread_concurrency=64 |
| 37 | #innodb_file_format=barracuda |
| 38 | innodb_flush_method = O_DIRECT |
| 39 | innodb_autoinc_lock_mode=2 |
| 40 | ## avoid statistics update when doing e.g show tables |
| 41 | innodb_stats_on_metadata=0 |
| 42 | default_storage_engine=innodb |
| 43 | |
| 44 | bind-address={{ service.bind.address }} |
| 45 | |
| 46 | # CHARACTER SET |
| 47 | #collation_server = utf8_unicode_ci |
| 48 | #init_connect='SET NAMES utf8' |
| 49 | character_set_server = utf8 |
| 50 | |
| 51 | # REPLICATION SPECIFIC |
| 52 | #server_id must be unique across all mysql servers participating in replication. |
| 53 | #server_id=SERVERID |
| 54 | binlog_format=ROW |
| 55 | #log_slave_updates=1 |
| 56 | #log_bin=binlog |
| 57 | #relay_log=relay-bin |
| 58 | #expire_logs_days=7 |
| 59 | #gtid_mode=ON |
| 60 | #enforce_gtid_consistency=1 |
| 61 | # OTHER THINGS, BUFFERS ETC |
| 62 | key_buffer_size = 24M |
| 63 | tmp_table_size = 64M |
| 64 | max_heap_table_size = 64M |
| 65 | max_allowed_packet = 512M |
| 66 | #sort_buffer_size = 256K |
| 67 | #read_buffer_size = 256K |
| 68 | #read_rnd_buffer_size = 512K |
| 69 | #myisam_sort_buffer_size = 8M |
| 70 | skip_name_resolve |
| 71 | memlock=0 |
| 72 | sysdate_is_now=1 |
| 73 | max_connections=2000 |
| 74 | thread_cache_size=512 |
| 75 | query_cache_type = 0 |
| 76 | query_cache_size = 0 |
| 77 | table_open_cache=1024 |
| 78 | lower_case_table_names=0 |
| 79 | # 5.6 backwards compatibility |
| 80 | #explicit_defaults_for_timestamp=1 |
| 81 | # |
| 82 | |
| 83 | # Desired SST donor name. |
| 84 | #wsrep_sst_donor= |
| 85 | |
| 86 | # Protocol version to use |
| 87 | # wsrep_protocol_version= |
| 88 | [MYSQL] |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame^] | 89 | socket={{ service.socket }} |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 90 | #default_character_set=utf8 |
| 91 | [client] |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame^] | 92 | socket={{ service.socket }} |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 93 | default_character_set=utf8 |
| 94 | [mysqldump] |
| 95 | max_allowed_packet = 512M |
Filip Pytloun | ca245cc | 2016-02-16 14:49:45 +0100 | [diff] [blame^] | 96 | socket={{ service.socket }} |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 97 | default_character_set=utf8 |
| 98 | [MYSQLD_SAFE] |
| 99 | pid_file=mysqld.pid |
Filip Pytloun | e40d54c | 2016-02-16 14:22:02 +0100 | [diff] [blame] | 100 | log_error={{ service.log_file }} |
Ales Komarek | cba48ac | 2015-04-30 11:40:44 +0200 | [diff] [blame] | 101 | basedir=/usr/ |
| 102 | datadir=/var/lib/mysql |