1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
binlog-format=ROW
bind-address=0.0.0.0
default-storage-engine=innodb
innodb-autoinc-lock-mode=2
innodb-flush-log-at-trx-commit=0
innodb-buffer-pool-size=1024M #物理内存一半
wsrep-provider=/usr/lib64/galera-3/libgalera_smm.so
wsrep-provider-options="gcache.dir=/var/lib/gcache;gcache.size=1G;gcache.recover=yes;pc.recovery=TRUE"
wsrep-cluster-name="mysql_galera_cluster" #集群名字
wsrep-cluster-address="gcomm://10.10.10.1,10.10.10.2,10.10.10.3"
wsrep-sst-method=rsync
wsrep-node-name=mysql_1 #当前节点名字
wsrep-node-address="10.10.10.1" #当前节点 cluster ip
#wsrep-auto-increment-control=OFF #只通过一个节点做增删改时使用
[mysql_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
!includedir /etc/my.cnf.d/
|