Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1. #
  2. # my.cnf template for clustercontroller
  3. # Copyright (C) 2011-2015 severalnines.com
  4. #
  5.  
  6. [MYSQLD]
  7. user=mysql
  8. basedir=/usr/
  9. datadir=/var/lib/mysql
  10. socket=/var/lib/mysql/mysql.sock
  11. pid_file=/var/lib/mysql/mysql.pid
  12. port=3306
  13. log_error=/var/log/mysql/mysqld.log
  14. log_warnings=2
  15. # log_output = FILE
  16. ### INNODB OPTIONS
  17. innodb_buffer_pool_size=2048M
  18. innodb_flush_log_at_trx_commit=2
  19. innodb_file_per_table=1
  20. innodb_data_file_path = ibdata1:100M:autoextend
  21. ## You may want to tune the below depending on number of cores and disk sub
  22. innodb_read_io_threads=4
  23. innodb_write_io_threads=4
  24. innodb_doublewrite=1
  25. innodb_log_file_size=512M
  26. innodb_log_buffer_size=64M
  27. innodb_buffer_pool_instances=-1
  28. innodb_log_files_in_group=2
  29. innodb_thread_concurrency=64
  30. # innodb_file_format = barracuda
  31. innodb_flush_method = O_DIRECT
  32. # innodb_locks_unsafe_for_binlog = 1
  33. innodb_autoinc_lock_mode=2
  34. ## avoid statistics update when doing e.g show tables
  35. innodb_stats_on_metadata=0
  36. default_storage_engine=innodb
  37.  
  38. # CHARACTER SET
  39. # collation_server = utf8_unicode_ci
  40. # init_connect = 'SET NAMES utf8'
  41. # character_set_server = utf8
  42.  
  43. # REPLICATION SPECIFIC
  44. server_id=1
  45. binlog_format=ROW
  46. # log_bin = binlog
  47. # log_slave_updates = 1
  48. # gtid_mode = ON
  49. # enforce_gtid_consistency = 1
  50. # relay_log = relay-bin
  51. # expire_logs_days = 7
  52.  
  53. # OTHER THINGS, BUFFERS ETC
  54. key_buffer_size = 24M
  55. tmp_table_size = 64M
  56. max_heap_table_size = 64M
  57. max_allowed_packet = 512M
  58. # sort_buffer_size = 256K
  59. # read_buffer_size = 256K
  60. # read_rnd_buffer_size = 512K
  61. # myisam_sort_buffer_size = 8M
  62. skip_name_resolve
  63. memlock=0
  64. sysdate_is_now=1
  65. max_connections=200
  66. thread_cache_size=512
  67. query_cache_type = 0
  68. query_cache_size = 0
  69. table_open_cache=1024
  70. lower_case_table_names=0
  71. # 5.6 backwards compatibility (FIXME)
  72. # explicit_defaults_for_timestamp = 1
  73. ##
  74. ## WSREP options
  75. ##
  76.  
  77. performance_schema = 1
  78. performance-schema-max-mutex-classes = 0
  79. performance-schema-max-mutex-instances = 0
  80.  
  81. # Full path to wsrep provider library or 'none'
  82. wsrep_provider=/usr/lib/galera/libgalera_smm.so
  83. wsrep_on=ON
  84. wsrep_node_address=195.154.39.138
  85.  
  86. # Provider specific configuration options
  87. wsrep_provider_options="gcache.size=10240M; gmcast.segment=0"
  88.  
  89. # Logical cluster name. Should be the same for all nodes.
  90. wsrep_cluster_name="my_wsrep_cluster"
  91.  
  92. # Group communication system handle
  93. wsrep_cluster_address=gcomm://195.154.39.138:4567,195.154.39.153:4567,195.154.47.134:4567
  94.  
  95. # Human_readable node name (non-unique). Hostname by default.
  96. wsrep_node_name=195.154.39.138
  97.  
  98. # Address for incoming client connections. Autodetect by default.
  99. #wsrep_node_incoming_address=
  100.  
  101. # How many threads will process writesets from other nodes
  102. wsrep_slave_threads=4
  103.  
  104. # DBUG options for wsrep provider
  105. #wsrep_dbug_option
  106.  
  107. # Generate fake primary keys for non-PK tables (required for multi-master
  108. # and parallel applying operation)
  109. wsrep_certify_nonPK=1
  110.  
  111. # Location of the directory with data files. Needed for non-mysqldump
  112. # state snapshot transfers. Defaults to mysql_real_data_home.
  113. #wsrep_data_home_dir=
  114.  
  115. # Maximum number of rows in write set
  116. wsrep_max_ws_rows=131072
  117.  
  118. # Maximum size of write set
  119. wsrep_max_ws_size=1073741824
  120.  
  121. # to enable debug level logging, set this to 1
  122. wsrep_debug=0
  123.  
  124. # convert locking sessions into transactions
  125. wsrep_convert_LOCK_to_trx=0
  126.  
  127. # how many times to retry deadlocked autocommits
  128. wsrep_retry_autocommit=1
  129.  
  130. # change auto_increment_increment and auto_increment_offset automatically
  131. wsrep_auto_increment_control=1
  132.  
  133. # replicate myisam
  134. wsrep_replicate_myisam=1
  135. # retry autoinc insert, which failed for duplicate key error
  136. wsrep_drupal_282555_workaround=0
  137.  
  138. # enable "strictly synchronous" semantics for read operations
  139. wsrep_causal_reads=0
  140.  
  141. # Command to call when node status or cluster membership changes.
  142. # Will be passed all or some of the following options:
  143. # --status - new status of this node
  144. # --uuid - UUID of the cluster
  145. # --primary - whether the component is primary or not ("yes"/"no")
  146. # --members - comma-separated list of members
  147. # --index - index of this node in the list
  148. #wsrep_notify_cmd=
  149.  
  150. ##
  151. ## WSREP State Transfer options
  152. ##
  153.  
  154. # State Snapshot Transfer method
  155. # ClusterControl currently DOES NOT support wsrep_sst_method=mysqldump
  156. wsrep_sst_method=xtrabackup-v2
  157.  
  158. # Address on THIS node to receive SST at. DON'T SET IT TO DONOR ADDRESS!!!
  159. # (SST method dependent. Defaults to the first IP of the first interface)
  160. #wsrep_sst_receive_address=
  161.  
  162. # SST authentication string. This will be used to send SST to joining nodes.
  163. # Depends on SST method. For mysqldump method it is root:<root password>
  164. # IMPORTANT: The user/password in wsrep_sst_auth must match
  165. # user/password in [xtrabackup]
  166. wsrep_sst_auth=backupuser:Cj5CDrRX36CjPOq4
  167.  
  168. # Desired SST donor name.
  169. #wsrep_sst_donor=
  170.  
  171. # Protocol version to use
  172. # wsrep_protocol_version=
  173.  
  174. [MYSQL]
  175. socket=/var/lib/mysql/mysql.sock
  176. # default_character_set = utf8
  177. [client]
  178. socket=/var/lib/mysql/mysql.sock
  179. # default_character_set = utf8
  180.  
  181. [mysqldump]
  182. max_allowed_packet = 512M
  183. # default_character_set = utf8
  184. user=backupuser
  185. password=Cj5CDrRX36CjPOq4
  186.  
  187. # IMPORTANT: The user/password in wsrep_sst_auth must match
  188. # user/password in [xtrabackup]
  189. [xtrabackup]
  190. user=backupuser
  191. password=Cj5CDrRX36CjPOq4
  192.  
  193.  
  194. [MYSQLD_SAFE]
  195. # log_error = /var/log/mysqld.log
  196. basedir=/usr/
  197. # datadir = /var/lib/mysql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement