Upgrade 3CX to v18 and get it hosted free!

MySQL Data Replication

Author image

Synopsis

Basic MYSQL Database Replication

Description

True HA installations involving databases require redundancy of the database serving itself. Large installations may require MySQL Cluster,
however, smaller installations can get away with simply circular MySQL replication. This page will show you how to configure two nodes to replicate
all information between each other. Both nodes are writeable and when the replication is severed, they will resync once replication is restored. There
is also a patch available to split up reading and writing up to seperate servers, spreading out load on the database.

MySQL Node 1:

/etc/my.cnf

[mysqld]
log-bin
server-id = 1
master-host = mysql-2.whatever.com
master-user = root
master-password = stellance
relay-log = mysql-2-relay-bin
auto_increment_increment = 2
auto_increment_offset = 1

 

MySQL Node 2:

/etc/my.cnf

[mysqld]
log-bin
server-id = 2
master-host = mysql-1.whatever.com
master-user = root
master-password = stellance
relay-log = mysql-1-relay-bin
auto_increment_increment = 2
auto_increment_offset = 2

See also

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.