Juju Charm - Percona XtraDB Cluster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

153 lines
3.5 KiB

[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/percona-xtradb-cluster
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Never resolve IP's to hostnames; it adds overhead
# and is not really reliable for use with ACL's.
skip-name-resolve
#
# * Networking
#
{% if bind_address -%}
bind-address = {{ bind_address }}
{% else -%}
bind-address = 0.0.0.0
{% endif %}
#
# * Fine Tuning
#
key_buffer_size = {{ key_buffer }}
table_open_cache = {{ table_open_cache }}
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
{% if max_connections != -1 -%}
max_connections = {{ max_connections }}
{% endif %}
{% if wait_timeout != -1 -%}
# Seconds before clearing idle connections
wait_timeout = {{ wait_timeout }}
{% endif %}
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
{% if enable_binlogs -%}
log_bin={{ binlogs_path }}
{% endif %}
expire_logs_days = {{ binlogs_expire_days }}
max_binlog_size = {{ binlogs_max_size }}
# Required to allow trigger creation for openstack services
log_bin_trust_function_creators = 1
#
# * InnoDB
#
{% 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 %}
# This option is driven by via the tuning-level configuration option
# safest = 1 (default)
# fast = 2
# unsafe = 0
innodb_flush_log_at_trx_commit = {{ innodb_flush_log_at_trx_commit }}
innodb_buffer_pool_size = {{ innodb_buffer_pool_size }}
{% if innodb_change_buffering -%}
innodb_change_buffering = {{ innodb_change_buffering }}
{% endif %}
{% if innodb_io_capacity -%}
innodb_io_capacity = {{ innodb_io_capacity }}
{% endif %}
#
# * Galera
#
wsrep_provider=/usr/lib/libgalera_smm.so
# Add address of other cluster nodes here
{% if not clustered and is_leader -%}
# 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 %}
#
# Node 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 wsrep_provider_options -%}
wsrep_provider_options = {{ wsrep_provider_options }}
{% endif %}
#
# * Performance Schema
#
{% if performance_schema -%}
performance_schema=On
{% else -%}
performance_schema=Off
{% endif %}
#
# * IPv6 SST configuration
#
{% if ipv6 -%}
[sst]
sockopt=,pf=ip6
{% endif %}