1. Initial requirements
Before configuring the master and the slave server, you must verify that the following files are configured for BOTH servers:
Step 1. Check the "Binary Logging"
Binary logging is the method that the master uses to store the queries that the slave needs to replicate.
- Go to pah
C:\Program Files\edinn\edinnM2\Server\MySQL
(it could be C:\Program Files (x86)\edinn\edinnM2\Server\MySQL in computers with 32 bits processor architecture). - Open the file my.ini in a text editor as administrator, for example: Notepad++.
- Search in the file (CTRL+F) the method "# Binary Logging" and check the correspondance. If it does not exist, create it by copying the following parameters:
# Binary Logging
log-bin="log-bin"
log-slave-updates=0
binlog-format=MIXED
log_bin_trust_function_creators=1
expire_logs_days=7
max_binlog_size=1G
- Include this new entry in the my.ini file, putting 1 in the master and 2 in the slave:
# Server Id: Put 1 for the master and 2 for the slave
server-id=1 - Save the changes to the my.ini file.
Step 2. Check the "Replication" restrictions
To reduce the amount of data written in binary log and to prevent replication of data which needs to be unique for each server, configure the following parameters:
- Go to path C:\Program Files (x86)\edinn\edinnM2\Server and execute, with administrator permissions, the program edinnM2_Console.exe (you can copy and paste to your desktop a link to this application as you will use it later, remember to mark it to be executed with administrator permissions). Copy the Company Id for later use.
- Go to path
C:\Program Files\edinn\edinnM2\Server\MySQL - Open the file my.ini in a text editor as administrator, for example: Notepad++.
- Search in the file (CTRL+F) the method "# Replication". If it does not exist, create it by copying the following parameters. Please remember to replace the #CompanyID# text by the company Id number copied in step 1:
# Replication
slave_net_timeout=300
replicate-do-db=edinnm2_#CompanyID#
replicate-ignore-table=edinnm2_#CompanyID#.m2conf
replicate-ignore-table=edinnm2_#CompanyID#.m2logs
replicate-ignore-table=edinnm2_#CompanyID#.m2molo
replicate-ignore-table=edinnm2_#CompanyID#.m2reca
slave-skip-errors=1062
- Save the changes to the my.ini file.
Step 3. Restart the edinn database service
- From the Windows search icon, type “Services” and right-click the app returned and select “Run as administrator”.
- In the list, search "edinnM2_MySQL" and choose "Restart".