diff --git a/mysql/files/my-include.cnf b/mysql/files/my-include.cnf
index 35eff10d51eec2891ee3cd0b5b28d82732e02cae..2ea1102beccc7a3989c42f6dfc2791b5ae1e99fa 100644
--- a/mysql/files/my-include.cnf
+++ b/mysql/files/my-include.cnf
@@ -9,10 +9,10 @@
 {#-
 ===== COMBINE DATA =====
 -#}
-{%- if "sections" in mysql.config -%}
-{%- set goodParamList = mysql.config.sections -%}
+{%- if "global_config" in mysql and "sections" in mysql.global_config -%}
+{%- set goodParamList = mysql.global_config.sections -%}
 {%- for section_name in supported_sections -%}
-    {%- set sectdict = mysql.config.sections[section_name] | default({}) -%}
+    {%- set sectdict = mysql.global_config.sections[section_name] | default({}) -%}
     {%- for mparam, mvalue in salt['pillar.get']('mysql:global:'+section_name, {}).items() -%}
         {%- set mparamUnderscore = mparam | replace('-','_') -%}
         {%- do sectdict.update({mparamUnderscore:mvalue}) -%}