To configure a MySQL to become a replication master, we must enable binary logging (log-bin) and establish a unique server ID (server-id). 

1. Launch Windows Console (Run as Administrator)

2. Change to MySQL folder

cd C:\Program Files\Deepnet DualShield\mysql

3. Open "das.ini" file in a text editor, e.g. Notepad, insert the following settings:

[mysqld]
server-id=1/2/.../N
auto_increment_increment=N
auto_increment_offset=1/2/.../N
log-bin=mysql-bin
master_info_repository = TABLE
relay_log_info_repository = TABLE
relay_log_recovery = 1
replicate-do-db=DualShield
replicate-same-server-id=0
binlog_do_db=DualShield

- "server-id" is to uniquely identify the current server in the replication cluster.  

- "auto_increment_increment" controls the increment between successive AUTO_INCREMENT values.

- "auto_increment_offset" determines the starting point for AUTO_INCREMENT column values.

Assuming that we have N servers in the replication cluster, then each server must have a different value for "server-id" and "auto_increment_offset" (1, 2, ..., N), and "auto_increment_increment" has the value N on all servers.

- "replicate-do-db" indicates which database we want to replicate across servers.

By default, the database name created for DualShield is called "DualShield". If you have changed the default name then you need to change it here accordingly.

  • No labels