Advertisement
Guest User

Untitled

a guest
Apr 6th, 2018
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.12 KB | None | 0 0
  1. [mysqld]
  2.  
  3. ## General
  4. ignore-db-dirs = "lost+found"
  5. datadir = /var/lib/mysql
  6. enforce-storage-engine = innodb
  7. log-error = /var/log/mysqld.log
  8. socket = /var/lib/mysql/mysql.sock
  9. tmpdir = /var/lib/mysqltmp
  10. userstat = OFF
  11. optimizer-switch = "index_merge_intersection=off"
  12.  
  13. ## Cache
  14. table-definition-cache = 16384
  15. table-open-cache = 8192
  16. table-open-cache-instances = 8
  17. thread-cache-size = 256
  18.  
  19. ## Per Thread Cache (see max-connections)
  20. binlog-cache-size = 1M
  21. #join-buffer-size = 4M
  22. #read-buffer-size = 2M
  23. #read-rnd-buffer-size = 8M
  24. #sort-buffer-size = 2M
  25.  
  26. ## Temp Tables
  27. #max-heap-table-size = 32M
  28. #tmp-table-size = 16M
  29.  
  30. ## Networking
  31. interactive-timeout = 28800
  32. max-connections = 500
  33. max-user-connections = 400
  34. #wait-timeout = 600
  35.  
  36. max-connect-errors = 1000000
  37. max-allowed-packet = 64M
  38. skip-name-resolve
  39.  
  40. ## MyISAM used by grants
  41. key-buffer-size = 32M
  42. myisam-recover-options = DEFAULT
  43. myisam-sort-buffer-size = 128M
  44.  
  45. ## InnoDB
  46. innodb-adaptive-hash-index-partitions = 4
  47. innodb-buffer-pool-size = 128M # Start with 50% total RAM
  48. innodb-checksum-algorithm = strict_crc32
  49. loose-innodb-file-format = Barracuda
  50. innodb-file-per-table = 1
  51. innodb-flush-neighbors = 1 # Turn off when using SSD
  52. innodb-force-primary-key = 1
  53. innodb-io-capacity = 500
  54. innodb-io-capacity-max = 2500
  55. loose-innodb-log-checksum-algorithm = strict_crc32
  56. innodb-log-file-size = 1G
  57. innodb-lock-wait-timeout = 30
  58. innodb-lru-scan-depth = 2500
  59. innodb-flush-method = O_DIRECT
  60. innodb-open-files = 4096
  61. innodb-print-all-deadlocks = 0 # Debugging only
  62. innodb-purge-threads = 4
  63. innodb-sort-buffer-size = 4M
  64. innodb-stats-on-metadata = 0
  65. innodb-undo-tablespaces = 4
  66.  
  67. ## Replication and PITR
  68. binlog-row-image = minimal # this is buggy/incompatible in some versions
  69. expire-logs-days = 4
  70. loose-gtid-domain-id = 2 # MariaDB only
  71. log-bin = /var/lib/mysqllogs/bin-log
  72. log-slave-updates = 1
  73. max-binlog-size = 256M
  74. relay-log = /var/lib/mysqllogs/relay-log
  75. relay-log-info-repository = TABLE # Used when Galera is an async slave
  76. relay-log-recovery = ON # Used when Galera is an async slave
  77. slave-net-timeout = 10 # Used when Galera is an async slave
  78. slave-transaction-retries = 30 # Used when Galera is an async slave
  79. sync-binlog = 1
  80. wsrep-restart-slave = 1 # Used when Galera node is an async slave
  81.  
  82. ## Logging
  83. log-slow-admin-statements
  84. log-slow-slave-statements
  85. #log-warnings = 0
  86. long-query-time = 2
  87. #log-slow-verbosity = 'innodb,query_plan'
  88. min-examined-row-limit = 2000
  89. slow-query-log = 1
  90. slow-query-log-file = /var/lib/mysqllogs/slow-log
  91.  
  92. ## SSL (see https://dev.mysql.com/doc/refman/5.6/en/creating-ssl-files-using-openssl.html)
  93. ssl-ca = /etc/mysql-ssl/ca.pem
  94. ssl-cert = /etc/mysql-ssl/server-cert.pem
  95. ssl-cipher = "AES128-SHA"
  96. ssl-key = /etc/mysql-ssl/server-key.pem
  97.  
  98. ## Galera required settings
  99. binlog-format = ROW
  100. default-storage-engine = InnoDB
  101. innodb-autoinc-lock-mode = 2
  102. innodb-doublewrite = 1
  103. loose-innodb-locks-unsafe-for-binlog = 1 # Not really required
  104. innodb-flush-log-at-trx-commit = 0 # Not really required
  105. log-output = FILE
  106. query-cache-size = 0
  107. query-cache-type = 0 # No longer required
  108.  
  109. ## Galera cluster wide settings
  110. wsrep-cluster-address = "gcomm://10.208.132.176,10.208.134.45"
  111. wsrep-cluster-name = "keeptest"
  112. ## This can be useful if you experience lots of conflicts and need to mesure disk consumption
  113. #wsrep-data-home-dir = /var/lib/mysql-wsrep
  114.  
  115. wsrep-notify-cmd = "/usr/local/bin/block_galera_node.sh" # https://www.fromdual.com/sites/default/files/block_galera_node.shx
  116. # Requires /etc/sudoers.d/mysql (chmod 0440) containing both:
  117. # mysql ALL = (root) NOPASSWD: /sbin/iptables
  118. # Defaults:mysql !requiretty
  119. #
  120. # Script can be modified to allow traffic during donor
  121. # Script can be modified to use --reject-with tcp-reset
  122. # Need LB_IP config to contain VIPs and health source addresses (eg 4+ IPs)
  123.  
  124.  
  125.  
  126.  
  127. loose-wsrep-on = 1 # MariaDB 10.1+ requires this
  128. 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;"
  129. wsrep-provider = /usr/lib64/galera/libgalera_smm.so
  130. wsrep-slave-threads = 32
  131. wsrep-sst-method = "xtrabackup-v2"
  132. wsrep-sst-auth = "sst_xtrabackup:TCuGaK6MLeJJM8"
  133.  
  134. ## Galera node specific settings
  135. ## Which IP to bind MySQL API 3306 to, do not set with keepalived
  136. #bind-address = 192.168.100.101
  137. server-id = 101
  138. ## Set distinct node names so that wsrep-sst-donor is easier
  139. wsrep-node-name = "db1"
  140. ## Which IP to bind group communication on, in the event of multiple NICs
  141. wsrep-node-address = 10.208.132.176
  142. ## if you define wsrep-sst-donor it must match as @@wsrep_node_name *not* an IP Address
  143. #wsrep-sst-donor = db2.example.faketld
  144.  
  145. [sst]
  146. encrypt = 2
  147. tca = /etc/mysql-ssl/ca.pem
  148. tcert = /etc/mysql-ssl/server-cert.pem
  149. sockopt = ",verify=1,key=/etc/mysql-ssl/server-key.pem"
  150. compressor = "pigz -p1 -1"
  151. decompressor = "pigz -d"
  152. # Adding parallel here to avoid breaking holland percona-xtrabackup nightly tar stream
  153. inno-backup-opts = "--parallel=1"
  154. inno-apply-opts = "--use-memory=256M"
  155.  
  156. [xtrabackup]
  157. open-files-limit = 262140
  158. no-backup-locks # /percona-xtradb-cluster/+bug/1401133
  159.  
  160. [mysqld_safe]
  161. log-error = /var/log/mysqld.log
  162. #malloc-lib = /usr/lib64/libjemalloc.so.1 # jemalloc bundled but can be explicitly installed by yum/apt, does not affect systemd
  163. open-files-limit = 65535
  164.  
  165. [mysql]
  166. no-auto-rehash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement