diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg
index 7998ff65c4c31fc180621f775f15aa8c42cd6956..e80993a469e8aa47bf2f421c205f9258554e389e 100644
--- a/stack/erp5/buildout.cfg
+++ b/stack/erp5/buildout.cfg
@@ -201,7 +201,7 @@ md5sum = c4c42d06c63d33de703fc03415e34d84
 [template-my-cnf]
 < = download-base
 filename = my.cnf.in
-md5sum = dc7c5db29474f7c65a696586734a5c52
+md5sum = 774b0e5d167b75a0ad8ead45fa2eadf6
 
 [template-mariadb-initial-setup]
 < = download-base
diff --git a/stack/erp5/my.cnf.in b/stack/erp5/my.cnf.in
index 22b57c4848df7be3b5099466ac8201902ecf4331..a40dc0be6b0cade3068cec2b3b9ec8922de48910 100644
--- a/stack/erp5/my.cnf.in
+++ b/stack/erp5/my.cnf.in
@@ -54,15 +54,16 @@ innodb_locks_unsafe_for_binlog = 1
 log_bin = {{ log_bin }}
 {% set binlog_expire_days = parameter_dict['binlog-expire-days'] -%}
 {% if binlog_expire_days > 0 %}expire_logs_days = {{ binlog_expire_days }}{% endif %}
-{% endif -%}
+{% endif %}
 
+# Some dangerous settings you may want to uncomment temporarily
+# if you only want performance or less disk access.
 {# Note: strictly check equality to one, as a last line of defense against users not reading the doc. -#}
-{% if parameter_dict['relaxed-writes'] -%}
-innodb_flush_log_at_trx_commit = 0
-innodb_flush_method = nosync
-innodb_doublewrite = 0
-sync_frm = 0
-{% endif -%}
+{% set x = '' if parameter_dict['relaxed-writes'] else '#' -%}
+{{x}}innodb_flush_log_at_trx_commit = 0
+{{x}}innodb_flush_method = nosync
+{{x}}innodb_doublewrite = 0
+{{x}}sync_frm = 0
 
 # Force utf8 usage
 collation_server = utf8_unicode_ci