From ef67883ab2d606965f8198ff78972df872a5d846 Mon Sep 17 00:00:00 2001 From: "Jasper N. Brouwer" Date: Wed, 28 Jun 2017 21:55:44 +0200 Subject: [PATCH] Proper comment on why changing innodb_log_file_size breaks the system --- defaults/main.yml | 2 +- templates/etc/mysql/my.cnf.j2 | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 01c755d..a580345 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -45,7 +45,7 @@ mysql_thread_concurrency: 2 # InnoDB settings. mysql_innodb_file_per_table: '1' mysql_innodb_buffer_pool_size: "{{ (ansible_memtotal_mb * 0.2) | round | int }}M" -mysql_innodb_log_file_size: '64M' +mysql_innodb_log_file_size: '64M' # If this setting changes on a running system, you will break it! http://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html mysql_innodb_log_buffer_size: '8M' mysql_innodb_flush_log_at_trx_commit: '1' mysql_innodb_lock_wait_timeout: 50 diff --git a/templates/etc/mysql/my.cnf.j2 b/templates/etc/mysql/my.cnf.j2 index 4252704..a7e21d5 100644 --- a/templates/etc/mysql/my.cnf.j2 +++ b/templates/etc/mysql/my.cnf.j2 @@ -63,11 +63,13 @@ 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 }} -{# It craches after install (mysql 5.5)... TODO: FIX -> http://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html #} -#innodb_log_file_size = {{ mysql_innodb_log_file_size }} -#innodb_log_buffer_size = {{ mysql_innodb_log_buffer_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 }} +{# If this setting changes on a running system, you will break it! #} +{# See how tho change it here: http://dev.mysql.com/doc/refman/5.6/en/innodb-data-log-reconfiguration.html #} +{# TODO FIX -> Maybe detect a change and fail, just to be safe? #} +innodb_log_file_size = {{ mysql_innodb_log_file_size }} [mysqldump] quick