Skip to content

Instantly share code, notes, and snippets.

@nirbhayc
Created February 17, 2016 16:24
Show Gist options
  • Save nirbhayc/692b122d3b56895dae29 to your computer and use it in GitHub Desktop.
Save nirbhayc/692b122d3b56895dae29 to your computer and use it in GitHub Desktop.
Configuration
=============
Node 1 :
[mysqld]
basedir=/home/nirbhay/project/git-repo/maria/10.1/install
datadir=/home/nirbhay/project/git-repo/maria/10.1/install/data1
log-bin
log-slave-updates
binlog_format=row
port=16001
socket=/tmp/my_node1.sock
server-id=1
gtid_domain_id=1
[galera]
wsrep_on=1
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_provider_options='base_port=4000;socket.ssl_cert=/home/nirbhay/project/git-repo/maria/ssl/cert.pem;socket.ssl_key=/home/nirbhay/project/git-repo/maria/ssl/key.pem;socket.ssl_cipher=TLSv1.2'
wsrep_cluster_address=gcomm://
wsrep_sst_method=rsync
wsrep_node_name=my_node1
wsrep_node_address=127.0.0.1
wsrep_debug=1
wsrep_gtid_mode=ON
wsrep_gtid_domain_id=9999
Node 2 :
[mysqld]
basedir=/home/nirbhay/project/git-repo/maria/10.1/install
datadir=/home/nirbhay/project/git-repo/maria/10.1/install/data2
log-bin
log-slave-updates
binlog_format=row
port=16002
socket=/tmp/my_node2.sock
server-id=1
gtid_domain_id=2
[galera]
wsrep_on=1
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_provider_options='base_port=4010;socket.ssl_cert=/home/nirbhay/project/git-repo/maria/ssl/cert.pem;socket.ssl_key=/home/nirbhay/project/git-repo/maria/ssl/key.pem;socket.ssl_cipher=TLSv1.2'
wsrep_cluster_address='gcomm://127.0.0.1:4000'
wsrep_sst_method=rsync
wsrep_node_name=my_node2
wsrep_node_address=127.0.0.1
wsrep_debug=1
wsrep_gtid_mode=ON
wsrep_gtid_domain_id=9999
Execution
=========
* On Node 1: Create an INNODB table (replicated), insert a few records (replicated)
* On Node 2: Create a HEAP table (replicated), insert a few records (not-replicated)
Node1:
MariaDB [test]> show variables like '%gtid%';
+------------------------+----------+
| Variable_name | Value |
+------------------------+----------+
| gtid_binlog_pos | 9999-1-4 |
| gtid_binlog_state | 9999-1-4 |
| gtid_current_pos | 9999-1-4 |
| gtid_domain_id | 1 |
| gtid_ignore_duplicates | OFF |
| gtid_seq_no | 0 |
| gtid_slave_pos | |
| gtid_strict_mode | OFF |
| last_gtid | 9999-1-4 |
| wsrep_gtid_domain_id | 9999 |
| wsrep_gtid_mode | ON |
+------------------------+----------+
11 rows in set (0.00 sec)
Node2:
MariaDB [test]> show variables like '%gtid%';
+------------------------+----------------+
| Variable_name | Value |
+------------------------+----------------+
| gtid_binlog_pos | 2-1-3,9999-1-4 |
| gtid_binlog_state | 2-1-3,9999-1-4 |
| gtid_current_pos | 2-1-3,9999-1-4 |
| gtid_domain_id | 2 |
| gtid_ignore_duplicates | OFF |
| gtid_seq_no | 0 |
| gtid_slave_pos | |
| gtid_strict_mode | OFF |
| last_gtid | 2-1-3 |
| wsrep_gtid_domain_id | 9999 |
| wsrep_gtid_mode | ON |
+------------------------+----------------+
11 rows in set (0.01 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment