Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [mysqld]
- ## General
- ignore-db-dirs = "lost+found"
- datadir = /var/lib/mysql
- enforce-storage-engine = innodb
- log-error = /var/log/mysqld.log
- socket = /var/lib/mysql/mysql.sock
- tmpdir = /var/lib/mysqltmp
- userstat = OFF
- optimizer-switch = "index_merge_intersection=off"
- ## Cache
- table-definition-cache = 16384
- table-open-cache = 8192
- table-open-cache-instances = 8
- thread-cache-size = 256
- ## Per Thread Cache (see max-connections)
- binlog-cache-size = 1M
- #join-buffer-size = 4M
- #read-buffer-size = 2M
- #read-rnd-buffer-size = 8M
- #sort-buffer-size = 2M
- ## Temp Tables
- #max-heap-table-size = 32M
- #tmp-table-size = 16M
- ## Networking
- interactive-timeout = 28800
- max-connections = 500
- max-user-connections = 400
- #wait-timeout = 600
- max-connect-errors = 1000000
- max-allowed-packet = 64M
- skip-name-resolve
- ## MyISAM used by grants
- key-buffer-size = 32M
- myisam-recover-options = DEFAULT
- myisam-sort-buffer-size = 128M
- ## InnoDB
- innodb-adaptive-hash-index-partitions = 4
- innodb-buffer-pool-size = 128M # Start with 50% total RAM
- innodb-checksum-algorithm = strict_crc32
- loose-innodb-file-format = Barracuda
- innodb-file-per-table = 1
- innodb-flush-neighbors = 1 # Turn off when using SSD
- innodb-force-primary-key = 1
- innodb-io-capacity = 500
- innodb-io-capacity-max = 2500
- loose-innodb-log-checksum-algorithm = strict_crc32
- innodb-log-file-size = 1G
- innodb-lock-wait-timeout = 30
- innodb-lru-scan-depth = 2500
- innodb-flush-method = O_DIRECT
- innodb-open-files = 4096
- innodb-print-all-deadlocks = 0 # Debugging only
- innodb-purge-threads = 4
- innodb-sort-buffer-size = 4M
- innodb-stats-on-metadata = 0
- innodb-undo-tablespaces = 4
- ## Replication and PITR
- binlog-row-image = minimal # this is buggy/incompatible in some versions
- expire-logs-days = 4
- loose-gtid-domain-id = 2 # MariaDB only
- log-bin = /var/lib/mysqllogs/bin-log
- log-slave-updates = 1
- max-binlog-size = 256M
- relay-log = /var/lib/mysqllogs/relay-log
- relay-log-info-repository = TABLE # Used when Galera is an async slave
- relay-log-recovery = ON # Used when Galera is an async slave
- slave-net-timeout = 10 # Used when Galera is an async slave
- slave-transaction-retries = 30 # Used when Galera is an async slave
- sync-binlog = 1
- wsrep-restart-slave = 1 # Used when Galera node is an async slave
- ## Logging
- log-slow-admin-statements
- log-slow-slave-statements
- #log-warnings = 0
- long-query-time = 2
- #log-slow-verbosity = 'innodb,query_plan'
- min-examined-row-limit = 2000
- slow-query-log = 1
- slow-query-log-file = /var/lib/mysqllogs/slow-log
- ## SSL (see https://dev.mysql.com/doc/refman/5.6/en/creating-ssl-files-using-openssl.html)
- ssl-ca = /etc/mysql-ssl/ca.pem
- ssl-cert = /etc/mysql-ssl/server-cert.pem
- ssl-cipher = "AES128-SHA"
- ssl-key = /etc/mysql-ssl/server-key.pem
- ## Galera required settings
- binlog-format = ROW
- default-storage-engine = InnoDB
- innodb-autoinc-lock-mode = 2
- innodb-doublewrite = 1
- loose-innodb-locks-unsafe-for-binlog = 1 # Not really required
- innodb-flush-log-at-trx-commit = 0 # Not really required
- log-output = FILE
- query-cache-size = 0
- query-cache-type = 0 # No longer required
- ## Galera cluster wide settings
- wsrep-cluster-address = "gcomm://10.208.132.176,10.208.134.45"
- wsrep-cluster-name = "keeptest"
- ## This can be useful if you experience lots of conflicts and need to mesure disk consumption
- #wsrep-data-home-dir = /var/lib/mysql-wsrep
- wsrep-notify-cmd = "/usr/local/bin/block_galera_node.sh" # https://www.fromdual.com/sites/default/files/block_galera_node.shx
- # Requires /etc/sudoers.d/mysql (chmod 0440) containing both:
- # mysql ALL = (root) NOPASSWD: /sbin/iptables
- # Defaults:mysql !requiretty
- #
- # Script can be modified to allow traffic during donor
- # Script can be modified to use --reject-with tcp-reset
- # Need LB_IP config to contain VIPs and health source addresses (eg 4+ IPs)
- loose-wsrep-on = 1 # MariaDB 10.1+ requires this
- wsrep-provider-options = "cert.log_conflicts=1; evs.version=1; evs.auto_evict=0; gmcast.segment=0; gcache.size=10G; gcs.fc_limit=128; repl.key_format=FLAT16A; socket.ssl_cipher=AES128-SHA; socket.ssl_ca=/etc/mysql-ssl/ca.pem; socket.ssl_cert=/etc/mysql-ssl/server-cert.pem; socket.ssl_key=/etc/mysql-ssl/server-key.pem;"
- wsrep-provider = /usr/lib64/galera/libgalera_smm.so
- wsrep-slave-threads = 32
- wsrep-sst-method = "xtrabackup-v2"
- wsrep-sst-auth = "sst_xtrabackup:TCuGaK6MLeJJM8"
- ## Galera node specific settings
- ## Which IP to bind MySQL API 3306 to, do not set with keepalived
- #bind-address = 192.168.100.101
- server-id = 101
- ## Set distinct node names so that wsrep-sst-donor is easier
- wsrep-node-name = "db1"
- ## Which IP to bind group communication on, in the event of multiple NICs
- wsrep-node-address = 10.208.132.176
- ## if you define wsrep-sst-donor it must match as @@wsrep_node_name *not* an IP Address
- #wsrep-sst-donor = db2.example.faketld
- [sst]
- encrypt = 2
- tca = /etc/mysql-ssl/ca.pem
- tcert = /etc/mysql-ssl/server-cert.pem
- sockopt = ",verify=1,key=/etc/mysql-ssl/server-key.pem"
- compressor = "pigz -p1 -1"
- decompressor = "pigz -d"
- # Adding parallel here to avoid breaking holland percona-xtrabackup nightly tar stream
- inno-backup-opts = "--parallel=1"
- inno-apply-opts = "--use-memory=256M"
- [xtrabackup]
- open-files-limit = 262140
- no-backup-locks # /percona-xtradb-cluster/+bug/1401133
- [mysqld_safe]
- log-error = /var/log/mysqld.log
- #malloc-lib = /usr/lib64/libjemalloc.so.1 # jemalloc bundled but can be explicitly installed by yum/apt, does not affect systemd
- open-files-limit = 65535
- [mysql]
- no-auto-rehash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement