# Juju managed file - don't change as charm will overwrite your changed! [mysqld] {% if bind_address %} bind-address = {{ bind_address }} {% endif %} {% if wsrep_provider_options %} wsrep_provider_options = {{ wsrep_provider_options }} {% endif %} datadir=/var/lib/mysql user=mysql # Path to Galera library wsrep_provider=/usr/lib/libgalera_smm.so {% if not clustered %} # Empty gcomm address is being used when cluster is getting bootstrapped wsrep_cluster_address=gcomm:// {% else %} # Cluster connection URL contains the IPs of node#1, node#2 and node#3 wsrep_cluster_address=gcomm://{{ cluster_hosts }} {% endif %} # In order for Galera to work correctly binlog format should be ROW binlog_format=ROW # MyISAM storage engine has only experimental support default_storage_engine=InnoDB # This is a recommended tuning variable for performance innodb_locks_unsafe_for_binlog=1 # This changes how InnoDB autoincrement locks are managed and is a requirement for Galera innodb_autoinc_lock_mode=2 # Node #1 address wsrep_node_address={{ private_address }} # SST method wsrep_sst_method={{ sst_method }} # Cluster name wsrep_cluster_name={{ cluster_name }} # Authentication for SST method wsrep_sst_auth="sstuser:{{ sst_password }}" {% if max_connections != -1 %} max_connections = {{ max_connections }} {% endif %} # Fine tuning key_buffer_size = {{ key_buffer }} table_cache = 512 max_allowed_packet = 16M # InnoDB buffer should consume 100% of the bytes of the dataset size # query cache is not supported with Active/Active configuration innodb_buffer_pool_size = {{ dataset_bytes }} {% if ipv6 %} [sst] sockopt=,pf=ip6 {% endif %} !includedir /etc/mysql/conf.d/