2014-03-01 04:32:17 +01:00
|
|
|
[client]
|
2014-05-12 21:04:35 +02:00
|
|
|
#password = your_password
|
2014-08-07 12:55:56 +02:00
|
|
|
port = {{ mysql_port }}
|
|
|
|
socket = {{ mysql_socket }}
|
2014-05-12 21:04:35 +02:00
|
|
|
|
|
|
|
[mysqld]
|
|
|
|
port = {{ mysql_port }}
|
2014-11-15 19:23:19 +01:00
|
|
|
bind-address = {{ mysql_bind_address }}
|
2014-05-12 21:04:35 +02:00
|
|
|
datadir = {{ mysql_datadir }}
|
|
|
|
socket = {{ mysql_socket }}
|
|
|
|
|
2015-01-07 17:41:58 +01:00
|
|
|
{% if mysql_replication_master %}
|
2014-11-09 04:43:31 +01:00
|
|
|
# Replication
|
|
|
|
server-id = {{ mysql_server_id }}
|
|
|
|
|
|
|
|
{% if mysql_replication_role == 'master' %}
|
|
|
|
log_bin = mysql-bin
|
|
|
|
log-bin-index = mysql-bin.index
|
2015-03-01 05:00:26 +01:00
|
|
|
expire_logs_days = {{ mysql_expire_logs_days }}
|
2014-11-09 04:43:31 +01:00
|
|
|
max_binlog_size = {{ mysql_max_binlog_size }}
|
|
|
|
|
|
|
|
{% for db in mysql_databases %}
|
|
|
|
{% if db.replicate|default(1) %}
|
|
|
|
binlog_do_db = {{ db.name }}
|
|
|
|
{% else %}
|
|
|
|
binlog_ignore_db = {{ db.name }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if mysql_replication_role == 'slave' %}
|
|
|
|
read_only
|
|
|
|
relay-log = relay-bin
|
|
|
|
relay-log-index = relay-bin.index
|
|
|
|
{% endif %}
|
2015-01-07 17:41:58 +01:00
|
|
|
{% endif %}
|
2014-11-09 04:43:31 +01:00
|
|
|
|
2014-05-12 21:04:35 +02:00
|
|
|
# Disabling symbolic-links is recommended to prevent assorted security risks
|
|
|
|
symbolic-links = 0
|
|
|
|
|
2014-11-09 04:43:31 +01:00
|
|
|
# User is ignored when systemd is used (fedora <= 15).
|
2014-05-12 21:04:35 +02:00
|
|
|
user = mysql
|
|
|
|
|
|
|
|
# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
|
|
|
|
;performance_schema
|
|
|
|
|
|
|
|
# Memory settings.
|
|
|
|
key_buffer_size = {{ mysql_key_buffer_size }}
|
|
|
|
max_allowed_packet = {{ mysql_max_allowed_packet }}
|
|
|
|
table_open_cache = {{ mysql_table_open_cache }}
|
|
|
|
sort_buffer_size = {{ mysql_sort_buffer_size }}
|
|
|
|
read_buffer_size = {{ mysql_read_buffer_size }}
|
|
|
|
read_rnd_buffer_size = {{ mysql_read_rnd_buffer_size }}
|
|
|
|
myisam_sort_buffer_size = {{ mysql_myisam_sort_buffer_size }}
|
|
|
|
thread_cache_size = {{ mysql_thread_cache_size }}
|
|
|
|
query_cache_size = {{ mysql_query_cache_size }}
|
|
|
|
|
2014-07-03 15:25:12 +02:00
|
|
|
# Other settings.
|
|
|
|
wait_timeout = {{ mysql_wait_timeout }}
|
|
|
|
max_allowed_packet = {{ mysql_max_allowed_packet }}
|
|
|
|
|
2014-05-12 21:04:35 +02:00
|
|
|
# Try number of CPU's * 2 for thread_concurrency.
|
|
|
|
thread_concurrency = {{ mysql_thread_concurrency }}
|
|
|
|
|
|
|
|
# InnoDB settings.
|
|
|
|
innodb_file_per_table = {{ mysql_innodb_file_per_table }}
|
|
|
|
innodb_buffer_pool_size = {{ mysql_innodb_buffer_pool_size }}
|
|
|
|
innodb_additional_mem_pool_size = {{ mysql_innodb_additional_mem_pool_size }}
|
|
|
|
innodb_log_file_size = {{ mysql_innodb_log_file_size }}
|
|
|
|
innodb_log_buffer_size = {{ mysql_innodb_log_buffer_size }}
|
|
|
|
innodb_flush_log_at_trx_commit = {{ mysql_innodb_flush_log_at_trx_commit }}
|
|
|
|
innodb_lock_wait_timeout = {{ mysql_innodb_lock_wait_timeout }}
|
|
|
|
|
|
|
|
[mysqldump]
|
|
|
|
quick
|
|
|
|
max_allowed_packet = {{ mysql_mysqldump_max_allowed_packet }}
|
|
|
|
|
|
|
|
[mysqld_safe]
|
2014-08-07 12:50:14 +02:00
|
|
|
{% if mysql_log_error == 'syslog' %}
|
|
|
|
syslog
|
|
|
|
syslog-tag = {{ mysql_syslog_tag }}
|
|
|
|
{% else %}
|
|
|
|
skip-syslog
|
|
|
|
log-error = {{ mysql_log_error }}
|
|
|
|
{% endif %}
|
2014-05-12 21:04:35 +02:00
|
|
|
pid-file = /var/run/mysqld/mysqld.pid
|