# 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 pid_file = /var/run/mysqld/mysqld.pid # 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 {% if innodb_file_per_table -%} # This enables storing InnoDB tables in separate .ibd files. Note that, however # existing InnoDB tables will remain in ibdata file(s) unles OPTIMIZE is run # on them. Still, the ibdata1 file will NOT shrink - a full dump/import of the # data is needed in order to get rid of large ibdata file. innodb_file_per_table = 1 {% else -%} innodb_file_per_table = 0 {% endif %} # 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 %} # Seconds before clearing idle connections {% if wait_timeout != -1 %} wait_timeout = {{ wait_timeout }} {% endif %} # Fine tuning key_buffer_size = {{ key_buffer }} table_open_cache = {{ table_open_cache }} 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 = {{ innodb_buffer_pool_size }} {% if ipv6 -%} [sst] sockopt=,pf=ip6 {% endif %} {% if lp1366997_workaround -%} # Adding workaround for bug: # https://bugs.launchpad.net/charms/+source/percona-cluster/+bug/1366997 # Note that this should only be required for percona 5.5 wsrep_drupal_282555_workaround = ON wsrep_retry_autocommit = 100 {% endif %} !includedir /etc/mysql/conf.d/