-
Notifications
You must be signed in to change notification settings - Fork 33
/
my.cnf
174 lines (151 loc) · 5.18 KB
/
my.cnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# Config file to be used with InnoDB clusters
# Created by Matt.Lord on April 30 2017
# Configuration Options
#-----------------------------------------------------------------------------
# Options used by all client programs
# Reference: http://dev.mysql.com/doc/refman/5.7/en/programs-client.html
[client]
# MySQL command-line client options
# Reference: http://dev.mysql.com/doc/refman/5.7/en/mysql-command-options.html
[mysql]
prompt="innodb-cluster> "
reconnect
show-warnings
#ssl-ca = ca.pem
#ssl-cert = client-cert.pem
#ssl-key = client-key.pem
# MySQL Server process options
# Reference: http://dev.mysql.com/doc/refman/5.7/en/mysqld-option-tables.html
[mysqld]
# basic process setup options
bind-address=0.0.0.0
user = mysql
basedir = /usr
datadir = /var/lib/mysql
ignore-db-dir = "lost+found"
tmpdir = /tmp
log-error = /var/lib/mysql/mysqld.err
# storage engine options
archive = OFF
blackhole = OFF
federated = OFF
partition = OFF
default-storage-engine = innodb
default-tmp-storage-engine = innodb
internal-tmp-disk-storage-engine = innodb
disabled-storage-engines = myisam
# misc options
#memlock = ON
key-buffer-size = 32M
table-open-cache = 8000
table-open-cache-instances = 16
back-log = 1500
query-cache-type = 0
join-buffer-size = 32K
sort-buffer-size = 32K
#max-allowed-packet =
#tmp-table-size =
#max-heap-table-size =
skip-temp-pool
max-connections = 150
# binary log and replication options
log-bin
binlog-row-image = MINIMAL
binlog-rows-query-log-events = ON
log-bin-trust-function-creators = TRUE
expire-logs-days = 4
max-binlog-size = 500M
relay-log-recovery = ON
slave-parallel-type = LOGICAL_CLOCK
slave-parallel-workers = 4
slave-rows-search-algorithms = 'INDEX_SCAN,HASH_SCAN'
slave-type-conversions = ALL_NON_LOSSY
sync-master-info = 0
sync-relay-log = 0
# character set, collation, and i18n options
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_520_ci
# crash handling and debugging options
core-file
# security options
default-password-lifetime = 0
#des-key-file =
ssl-ca = ca.pem
ssl-cert = server-cert.pem
ssl-key = server-key.pem
#ssl-crl =
#ssl-cipher =
#require-secure-transport = TRUE
# date and time handling options
default-time-zone = SYSTEM
explicit-defaults-for-timestamp = ON
# optimizer related options
#eq-range-index-dive-limit =
#optimizer-prune-level =
#optimizer-search-depth =
#range-optimizer-max-mem-size =
# scheduler options
#event-scheduler = ON
# logging options
#log-error-verbosity =
# Performance Schema options
performance-schema-consumer-events-transactions-current = ON
performance-schema-consumer-events-transactions-history = ON
# Enterprise features
# Reference: https://dev.mysql.com/doc/refman/5.7/en/audit-log-plugin.html
# Reference: https://dev.mysql.com/doc/refman/5.7/en/thread-pool-plugin.html
# Reference: https://dev.mysql.com/doc/refman/5.7/en/pam-authentication-plugin.html
#plugin-load=audit_log.so;thread_pool.so;authentication_pam.so
#audit-log=FORCE_PLUS_PERMANENT
#thread-pool-size = 64
# session tracking
#session-track-gtids = OWN_GTID
#session-track-schema = ON
#session-track-state-change = ON
#session-track-transaction-info = ON
# InnoDB options
innodb-buffer-pool-size = 128M
innodb-buffer-pool-instances = 4
innodb-autoinc-lock-mode = 2
innodb-flush-method = O_DIRECT_NO_FSYNC
innodb-log-file-size = 32M
innodb-log-files-in-group = 3
innodb-log-write-ahead-size = 4096
innodb-open-files = 128
innodb-log-buffer-size = 4M
innodb-monitor-enable = '%'
innodb-max-dirty-pages-pct = 90
innodb_max_dirty_pages_pct_lwm = 10
innodb-print-all-deadlocks = ON
innodb-undo-log-truncate = ON
innodb-undo-tablespaces = 2
innodb-undo-logs = 2
# group replication pre-requisites & recommendations
binlog-format = ROW
gtid-mode = ON
enforce-gtid-consistency = ON
log-slave-updates = ON
master-info-repository = TABLE
relay-log-info-repository = TABLE
binlog-checksum = NONE
slave-preserve-commit-order = ON
# prevent use of non-transactional storage engines
disabled_storage_engines="MyISAM,BLACKHOLE,FEDERATED,ARCHIVE"
# InnoDB gap locks are problematic for multi-primary conflict detection; none are used with READ-COMMITTED
# So if you don't rely on REPEATABLE-READ semantics and/or wish to use multi-primary mode then this
# isolation level is recommended
transaction-isolation = 'READ-COMMITTED'
# Let Group Replication manage the READ/WRITE mode of the server entirely throughout the process lifecycle
# super_read_only = ON
# group replication specific options
transaction-write-set-extraction = XXHASH64
# disable the IP whitelisting, as we won't know what the IP range will be
loose-group-replication-ip-whitelist='0.0.0.0/0'
# dynamic options to be driven by command-line parameters
#****************************************************************************
# server-id = ??? # must be unique within replication topologies
# group_replication_group_name = ??? # must be valid UUID
# group_replication_bootstrap_group = ??? # must be ON for the first node in the group
# group_replication_local_address = ??? # needs to be an IP address / hostname which the other GR containers can reach
# group_replication_group_seeds = ??? # is necessary for the non-bootstrap nodes
#****************************************************************************