my.cnf.in 1.35 KB
Newer Older
1
{% macro assert(x) %}{{ ("",)[not x] }}{% endmacro -%}
2
{% set socket = parameter_dict['socket'] -%}
3
{% set extra_dict = parameter_dict['extra-dict'] -%}
4 5 6 7
[mysqld]
skip_networking
socket = {{ socket }}
datadir = {{ parameter_dict['data-directory'] }}
8
tmpdir = {{ parameter_dict['tmp-directory'] }}
9 10 11 12 13 14 15 16 17
pid_file = {{ parameter_dict['pid-file'] }}
log_error = {{ parameter_dict['error-log'] }}
slow_query_log
slow_query_log_file = {{ parameter_dict['slow-query-log'] }}

init_file = {{ parameter_dict['init-file'] }}
log_warnings = 1
disable-log-bin

18 19 20
### Enables TokuDB
plugin-load = ha_tokudb

21 22 23 24 25 26 27 28
## The following settings come from ERP5 configuration.

max_allowed_packet = 128M
query_cache_size = 32M
innodb_locks_unsafe_for_binlog = 1

# Some dangerous settings you may want to uncomment temporarily
# if you only want performance or less disk access.
29
{% set x = '' if extra_dict.pop('relaxed-writes', False) else '#' -%}
30 31 32 33 34
{{x}}innodb_flush_log_at_trx_commit = 0
{{x}}innodb_flush_method = nosync
{{x}}innodb_doublewrite = 0
{{x}}sync_frm = 0

35 36 37 38 39 40 41
# Extra parameters.
{%- do extra_dict.setdefault('innodb_file_per_table',  '0') %}
{%- for k, v in extra_dict.iteritems() %}
{%- do assert('-' not in k) %}
{{ k }} = {{ v }}
{%- endfor %}

42 43 44 45 46 47 48 49
# Force utf8 usage
collation_server = utf8_unicode_ci
character_set_server = utf8
skip_character_set_client_handshake

[client]
socket = {{ socket }}
user = root