# # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # # See the examples of server my.cnf files in /usr/share/mysql/ # # this is read by the standalone daemon and embedded servers [server] # this is only for the mysqld standalone daemon [mysqld] # GENERAL # user = mysql default-storage-engine = InnoDB socket = /var/lib/mysql/mysql.sock pid-file = /var/lib/mysql/mysql.pid lower-case-table-names = 1 group-concat-max-len = 1000000 innodb_strict_mode = 0 sql_mode = '' # MyISAM # key-buffer-size = 256M myisam-recover-options = FORCE,BACKUP # SAFETY # max-allowed-packet = 256M max-connect-errors = 1000000 # DATA STORAGE # datadir = /var/lib/mysql/ # CACHES AND LIMITS # tmp-table-size = 4G max-heap-table-size = 4G query-cache-type = 1 query-cache-size = 256M max-connections = 50000 thread-cache-size = 100 open-files-limit = 65535 table-definition-cache = 1024 table-open-cache = 2048 # INNODB # innodb-flush-method = O_DIRECT innodb-log-files-in-group = 2 innodb-log-file-size = 256M innodb-flush-log-at-trx-commit = 2 innodb-file-per-table = 1 innodb-buffer-pool-size = 10G innodb-safe-truncate = OFF # LOGGING # log-error = /var/log/mysql/mysql-error.log log-queries-not-using-indexes = 1 slow-query-log = 1 slow-query-log-file = /var/lib/mysql/mysql-slow.log # # * Galera-related settings # [galera] # Mandatory settings #wsrep_on=ON #wsrep_provider= #wsrep_cluster_address= #binlog_format=row #default_storage_engine=InnoDB #innodb_autoinc_lock_mode=2 # binary logging # binlog-format = ROW innodb_autoinc_lock_mode=2 sync-binlog = 1 # Full path to wsrep provider library or 'none' wsrep_provider=/usr/lib64/galera/libgalera_smm.so wsrep_on=ON wsrep_node_address=10.0.3.103 # Provider specific configuration options wsrep_provider_options="base_port=4567; gcache.name=/var/lib/mysql/galera.cache; gcache.size=10240M; gmcast.segment=0" # Logical cluster name. Should be the same for all nodes. wsrep_cluster_name="wsrep_test_cluster" # Group communication system handle wsrep_cluster_address=gcomm://10.0.3.101,10.0.3.102,10.0.3.103 # Human_readable node name (non-unique). Hostname by default. wsrep_node_name=10.0.3.103 # Address for incoming client connections. Autodetect by default. #wsrep_node_incoming_address= # How many threads will process writesets from other nodes wsrep_slave_threads=4 # DBUG options for wsrep provider #wsrep_dbug_option # Generate fake primary keys for non-PK tables (required for multi-master # and parallel applying operation) wsrep_certify_nonPK=1 # Location of the directory with data files. Needed for non-mysqldump # state snapshot transfers. Defaults to mysql_real_data_home. #wsrep_data_home_dir= # Maximum number of rows in write set wsrep_max_ws_rows=1048576 # Maximum size of write set wsrep_max_ws_size=2147483647 # to enable debug level logging, set this to 1 wsrep_debug=0 # convert locking sessions into transactions wsrep_convert_LOCK_to_trx=0 # how many times to retry deadlocked autocommits wsrep_retry_autocommit=5 # change auto_increment_increment and auto_increment_offset automatically wsrep_auto_increment_control=1 # replicate myisam # still expermentital wsrep_replicate_myisam=0 # retry autoinc insert, which failed for duplicate key error wsrep_drupal_282555_workaround=0 # enable "strictly synchronous" semantics for read operations wsrep_causal_reads=0 # Command to call when node status or cluster membership changes. # Will be passed all or some of the following options: # --status - new status of this node # --uuid - UUID of the cluster # --primary - whether the component is primary or not ("yes"/"no") # --members - comma-separated list of members # --index - index of this node in the list #wsrep_notify_cmd= ## ## WSREP State Transfer options ## # State Snapshot Transfer method # ClusterControl currently DOES NOT support wsrep_sst_method=mysqldump #wsrep_sst_method=mariabackup # use xtrabackup-v2 since it will not block the donor node wsrep_sst_method=xtrabackup-v2 # Address on THIS node to receive SST at. DON'T SET IT TO DONOR ADDRESS!!! # (SST method dependent. Defaults to the first IP of the first interface) #wsrep_sst_receive_address= # SST authentication string. This will be used to send SST to joining nodes. # Depends on SST method. For mysqldump method it is root: # IMPORTANT: The user/password in wsrep_sst_auth must match # user/password in [xtrabackup] wsrep_sst_auth=galera-sync:65yz18G5DccVjLR # Desired SST donor name. #wsrep_sst_donor= # Protocol version to use # wsrep_protocol_version= # log conflicts wsrep_log_conflicts=1 # Allow server to accept connections on all interfaces. # bind-address=0.0.0.0 # # Optional setting #wsrep_slave_threads=1 #innodb_flush_log_at_trx_commit=0 # this is only for embedded server [embedded] # This group is only read by MariaDB servers, not by MySQL. # If you use the same .cnf file for MySQL and MariaDB, # you can put MariaDB-only options here [mariadb] # This group is only read by MariaDB-10.2 servers. # If you use the same .cnf file for MariaDB of different versions, # use this group for options that older servers don't understand [mariadb-10.2]