Page MenuHomePhabricator
Paste P11178

sample template for mariadb config with galera
ActivePublic

Authored by JHedden on May 11 2020, 1:53 PM.
[client]
port = 3306
socket = <%= @socket %>
[mysql]
default-character-set = utf8
[mysqld]
user = mysql
socket = <%= @socket %>
port = 3306
extra_port = 3307
basedir = <%= @basedir %>
datadir = <%= @datadir %>
tmpdir = <%= @tmpdir %>
server_id = <%= @server_id %>
bind-address = 0.0.0.0
<% if @ssl == 'on' or @ssl == 'puppet-cert' %>
# ssl
ssl-ca = /etc/ssl/certs/Puppet_Internal_CA.pem
ssl-cert = /etc/mysql/ssl/cert.pem
ssl-key = /etc/mysql/ssl/server.key
ssl-cipher = TLSv1.2
<% end %>
# character sets and collations
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
init-connect = 'SET NAMES utf8mb4'
# enable socket authentication
#plugin-load = unix_socket=auth_socket.so
# logging
log_bin = <%= @datadir %>/mysql-bin
log_slave_updates = 1
skip-name-resolve = 1
# connection limits
connect_timeout = 3
event_scheduler = 1
interactive_timeout = 28800
log-warnings = 0
max_allowed_packet = 32M
max_connect_errors = 1000000000
query_cache_size = 0
query_cache_type = 0
secure_file_priv = /dev/null
thread_cache_size = 100
thread_stack = 192K
userstat = 1
wait_timeout = 3600
# bin logs
binlog_cache_size = 1M
binlog_format = ROW
expire_logs_days = 7
max_binlog_size = 1000M
sync_binlog = 1
# cache limits
query-cache-size = 0M
query-cache-type = 0
table_definition_cache = 4000
table_open_cache = 5000
thread-cache-size = 50
# storage engine
default-storage-engine = InnoDB
innodb_buffer_pool_size = <%= (Float(@memorysize.split[0]) * 0.75).round %>G
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 1
innodb_flush_method = O_DIRECT
innodb_io_capacity = 1000
innodb_log_file_size = 1G
innodb_read_io_threads = 8
innodb_stats_method = nulls_unequal
innodb_stats_on_metadata = 0
innodb_stats_sample_pages = 16
innodb_strict_mode = 1
innodb_thread_concurrency = 0
innodb_write_io_threads = 8
# galera configuration
wsrep_on=ON
wsrep_cluster_address="gcomm://<%= @ipaddress %>"
wsrep_cluster_name="openstack"
wsrep_node_address="<%= @ipaddress %>"
wsrep_node_name="<%= @fqdn %>"
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_sst_method=rsync
[mysqldump]
quick
max_allowed_packet = 32M

Event Timeline