diff --git a/README.rst b/README.rst
index fb81acba752925b90d36d1853de599d005736178..39448159fc24c0658426dadce254e99f1f6c4484 100644
--- a/README.rst
+++ b/README.rst
@@ -118,3 +118,20 @@ Add the official MySQL 5.7 repository.
     Debian and Suse support to be added. Also need to add the option to allow
     selection of MySQL version (5.6 and 5.5 repos are added but disabled) and
     changed enabled repository accordingly.
+
+``mysql.config``
+------------------
+
+Manage the MySQL configuration.
+
+.. note::
+    There are currently two common ways to configure MySQL, a monolithic configuration file
+    or a configuration directory with configuration files per component. By default this
+    state will use a configuration directory for CentOS and Fedora, and a monolithic
+    configuration file for all other supported OSes.
+
+    Whether the configuration directory is used or not depends on whether `mysql.config_directory`
+    is defined in the pillar. If it is present it will pick the configuration from individual
+    component keys (`mysql.server`, `mysql.galera`, `mysql.libraries`, etc) with optional global
+    configuration from `mysql.global`. The monolithic configuration, however, is defined separately
+    in `mysql.config`.
diff --git a/mysql/config.sls b/mysql/config.sls
index 993c94ba195c6f4345b64d5276075d3ce165bb1e..1d3d343a42a3c5f94bc4bf898bd779c49f1be5d4 100644
--- a/mysql/config.sls
+++ b/mysql/config.sls
@@ -25,6 +25,8 @@ mysql_server_config:
     - group: root
     - mode: 644
     {% endif %}
+    - require:
+      - file: mysql_config_directory
 {% endif %}
 
 {% if "galera_config" in mysql %}
@@ -40,6 +42,8 @@ mysql_galera_config:
     - group: root
     - mode: 644
     {% endif %}
+    - require:
+      - file: mysql_config_directory
 {% endif %}
 
 {% if "library_config" in mysql %}
@@ -55,6 +59,8 @@ mysql_library_config:
     - group: root
     - mode: 644
     {% endif %}
+    - require:
+      - file: mysql_config_directory
 {% endif %}
 
 {% if "clients_config" in mysql %}
@@ -70,6 +76,8 @@ mysql_clients_config:
     - group: root
     - mode: 644
     {% endif %}
+    - require:
+      - file: mysql_config_directory
 {% endif %}
 
 {% endif %}
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}) -%}
diff --git a/mysql/server.sls b/mysql/server.sls
index 62ef0a0bc63e2a89bf734835f80b7909f027d6bd..275c085026be07716f6e70b2d04aa7a4c399551a 100644
--- a/mysql/server.sls
+++ b/mysql/server.sls
@@ -104,8 +104,11 @@ mysqld-packages:
 {% endif %}
     - require_in:
       - file: mysql_config
+{% if "config_directory" in mysql %}
+      - file: mysql_config_directory
+{% endif %}
 
-{% if os_family in ['RedHat', 'Suse'] and mysql.version is defined and mysql.version >= 5.7 and mysql.serverpkg != 'mariadb-server' %}
+{% if os_family in ['RedHat', 'Suse'] and mysql.version is defined and mysql.version >= 5.7 and mysql.serverpkg.lower() != 'mariadb-server' %}
 # Initialize mysql database with --initialize-insecure option before starting service so we don't get locked out.
 mysql_initialize:
   cmd.run:
@@ -116,7 +119,7 @@ mysql_initialize:
       - pkg: {{ mysql.serverpkg }}
 {% endif %}
 
-{% if os_family in ['RedHat', 'Suse'] and mysql.serverpkg == 'mariadb-server' %}
+{% if os_family in ['RedHat', 'Suse'] and mysql.serverpkg.lower() == 'mariadb-server' %}
 # For MariaDB it's enough to only create the datadir
 mysql_initialize:
   file.directory:
@@ -144,9 +147,9 @@ mysqld:
     - enable: True
     - require:
       - pkg: {{ mysql.serverpkg }}
-{% if (os_family in ['RedHat', 'Suse'] and mysql.version is defined and mysql.version >= 5.7 and mysql.serverpkg != 'mariadb-server') or (os_family in ['Gentoo']) %}
+{% if (os_family in ['RedHat', 'Suse'] and mysql.version is defined and mysql.version >= 5.7 and mysql.serverpkg.lower() != 'mariadb-server') or (os_family in ['Gentoo']) %}
       - cmd: mysql_initialize
-{% elif os_family in ['RedHat', 'Suse'] and mysql.serverpkg == 'mariadb-server' %}
+{% elif os_family in ['RedHat', 'Suse'] and mysql.serverpkg.lower() == 'mariadb-server' %}
       - file: {{ mysql_datadir }}
 {% endif %}
     - watch: