diff --git a/ansible/roles/mariadb/templates/galera.cnf.j2 b/ansible/roles/mariadb/templates/galera.cnf.j2 index 3dcb5f8670..3d7eb938e0 100644 --- a/ansible/roles/mariadb/templates/galera.cnf.j2 +++ b/ansible/roles/mariadb/templates/galera.cnf.j2 @@ -4,6 +4,12 @@ {#- mariadb will fail to start #} {%- set wsrep_driver = 'none' if orchestration_engine == 'KUBERNETES' else wsrep_driver %} +[client] +default-character-set=utf8 + +[mysql] +default-character-set=utf8 + [mysqld] bind-address={{ api_interface_address }} port={{ mariadb_port }} @@ -14,6 +20,10 @@ binlog_format=ROW default-storage-engine=innodb innodb_autoinc_lock_mode=2 +collation-server = utf8_unicode_ci +init-connect='SET NAMES utf8' +character-set-server = utf8 + datadir=/var/lib/mysql/ wsrep_cluster_address=gcomm://{% if (groups['mariadb'] | length) > 1 %}{% for host in groups['mariadb'] %}{{ hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] }}:{{ mariadb_wsrep_port }}{% if not loop.last %},{% endif %}{% endfor %}{% endif %}