ansible-roles/mysql/templates/server.cnf.j2

53 lines
1.8 KiB
Plaintext
Raw Normal View History

# Here follows entries for some specific programs
# The MariaDB server
[mysqld]
port = {{ mysql_db_port }}
2015-07-13 14:17:42 +02:00
socket = {{ mysql_socket }}
max_connections = {{ mysql_db_max_connections }}
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 8M
net_buffer_length = 8K
read_buffer_size = {{ mysqld_db_read_buffer_size }}
read_rnd_buffer_size = {{ mysql_db_read_rnd_buffer_size }}
myisam_sort_buffer_size = 16M
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
2015-07-13 14:17:42 +02:00
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
{% if mysql_listen_on_ext_int %}
bind-address = 0.0.0.0
{% else %}
bind-address = 127.0.0.1
{% endif %}
# Enable binary logging. This is required for acting as a MASTER in a
# replication configuration. You also need the binary log if you need
# the ability to do point in time recovery from your latest backup.
log-bin=mysql-bin
# binary logging format - mixed recommended
binlog_format=mixed
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/lib/mysql
innodb_data_file_path = {{ mysql_db_innodb_data_file_path }}
innodb_log_group_home_dir = /var/lib/mysql
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = {{ mysql_db_innodb_buffer_pool_size }}
innodb_additional_mem_pool_size = {{ mysql_db_innodb_additional_mem_pool_size }}
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = {{ mysql_db_innodb_log_file_size }}
innodb_log_buffer_size = {{ mysql_db_innodb_log_buffer_size }}
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
[mysqld_safe]
2015-07-13 14:17:42 +02:00
open-files-limit = {{ mysql_safe_open_files_limit }}