diff --git a/mysql/files/my.cnf b/mysql/files/my.cnf
index 86c892e04ddb1f32cd446c25c1d68b93da192ee7..8e976412b9f3d6b924a754255e3a077668499161 100644
--- a/mysql/files/my.cnf
+++ b/mysql/files/my.cnf
@@ -26,7 +26,7 @@
 {%- if sdata %}
 
 [{{ sname }}]
-{%- for mparam, mvalue in sdata.items()|default([]) -%}
+{%- for mparam, mvalue in sdata.items()|default([])|sort -%}
 {%- set indents = 40 - mparam|count %}
 {% if mvalue == "noarg_present" -%}
 {{ mparam }}