| 1 |
# |
| 2 |
# This .cnf file creates a setup with 1 standard MariaDB server, followed by a 3-node Galera cluster |
| 3 |
# |
| 4 |
|
| 5 |
# Use default setting for mysqld processes |
| 6 |
!include include/default_my.cnf |
| 7 |
|
| 8 |
[mysqld] |
| 9 |
loose-innodb |
| 10 |
log-bin=mysqld-bin |
| 11 |
log-slave-updates |
| 12 |
binlog-format=row |
| 13 |
innodb-autoinc-lock-mode=2 |
| 14 |
default-storage-engine=innodb |
| 15 |
# enforce read-committed characteristics across the cluster |
| 16 |
# wsrep-causal-reads=ON |
| 17 |
wsrep-sync-wait=15 |
| 18 |
|
| 19 |
[mysqld.1] |
| 20 |
wsrep-on=1 |
| 21 |
server-id=1 |
| 22 |
#[email protected] |
| 23 |
#[email protected] |
| 24 |
#[email protected] |
| 25 |
[email protected]_PROVIDER |
| 26 |
wsrep_cluster_address=gcomm:// |
| 27 |
wsrep_provider_options='repl.causal_read_timeout=PT90S;[email protected].#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M' |
| 28 |
wsrep_node_address='127.0.0.1:@mysqld.1.#galera_port' |
| 29 |
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port |
| 30 |
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' |
| 31 |
|
| 32 |
[mysqld.2] |
| 33 |
wsrep-on=1 |
| 34 |
server-id=2 |
| 35 |
#[email protected] |
| 36 |
#[email protected] |
| 37 |
#[email protected] |
| 38 |
[email protected]_PROVIDER |
| 39 |
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' |
| 40 |
wsrep_provider_options='repl.causal_read_timeout=PT90S;[email protected].#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M' |
| 41 |
wsrep_node_address='127.0.0.1:@mysqld.2.#galera_port' |
| 42 |
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port |
| 43 |
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' |
| 44 |
|
| 45 |
[mysqld.3] |
| 46 |
wsrep-on=1 |
| 47 |
server-id=3 |
| 48 |
#[email protected] |
| 49 |
#[email protected] |
| 50 |
#[email protected] |
| 51 |
[email protected]_PROVIDER |
| 52 |
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' |
| 53 |
wsrep_provider_options='repl.causal_read_timeout=PT90S;[email protected].#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;pc.wait_prim_timeout=PT60S;gcache.size=10M' |
| 54 |
wsrep_node_address='127.0.0.1:@mysqld.3.#galera_port' |
| 55 |
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port |
| 56 |
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port' |
| 57 |
|
| 58 |
[mysqld.4] |
| 59 |
wsrep-on=OFF |
| 60 |
server-id=4 |
| 61 |
|
| 62 |
[sst] |
| 63 |
[email protected]_VARDIR/log |
| 64 |
|
| 65 |
[ENV] |
| 66 |
NODE_MYPORT_1= @mysqld.1.port |
| 67 |
NODE_MYSOCK_1= @mysqld.1.socket |
| 68 |
|
| 69 |
NODE_MYPORT_2= @mysqld.2.port |
| 70 |
NODE_MYSOCK_2= @mysqld.2.socket |
| 71 |
|
| 72 |
NODE_MYPORT_3= @mysqld.3.port |
| 73 |
NODE_MYSOCK_3= @mysqld.3.socket |
| 74 |
|
| 75 |
NODE_MYPORT_4= @mysqld.4.port |
| 76 |
NODE_MYSOCK_4= @mysqld.4.socket |