Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This topic will cover the process to create a two node Maria DB cluster. The cluster will be configured to allow Soffid console to use either database node, which in turn will replicate data changes to the other one.


Node 1 actionNode 2 action
Create and setup a Maria DB in node 1. 

Configure Maria DB to generate binary log files. Add the following lines to /etc/mysql/my.conf:

server-id = 2

log-bin

binlog-format=row

expire_logs_days = 15

max_binlog_size = 1000M

replicate-ignore-table = soffid.SC_SEQUENCE

 

Restart MariaDB:

service mysql restart

 

 Create and setup a Maria DB in node 2.
 

Configure Maria DB to generate binary log files. Add the following lines to /etc/mysql/my.conf:

server-id = 2

log-bin

binlog-format=row

expire_logs_days = 15

max_binlog_size = 1000M

replicate-ignore-table = soffid.SC_SEQUENCE

 

Restart MariaDB:

service mysql restart
 

Create a user for node 1 to fetch data from node 2. From mysql, execute:

grant replication slave on *.* to replication_user@<NODE1-IP>

set password for replication_user@1<NODE1-IP> = password(' … ')

Create a user for node 2 to fetch data from node 1. From mysql, execute:

grant replication slave on *.* to replication_user@<NODE2-IP>

set password for replication_user@1<NODE2-IP> = password(' … ')

 

Query current binary log position:

MariaDB [(none)]> show master status;

The result should look like this:

FilePositionBinlog_Do_DBBinlog_Ignore_DB
mysqld-bin.00003068175  
 
 

Start replication from node 1 to node 2. From mysql, execute:

CHANGE MASTER TO

MASTER_HOST='...',

MASTER_USER='replication_user',

MASTER_PASSWORD='...',

MASTER_PORT=3306,

MASTER_LOG_FILE='mysqld-bin.000001',

MASTER_LOG_POS=26344,

MASTER_CONNECT_RETRY=10;

 

 

  • No labels