Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZCS-10242 : Mariadb master-master setup #95

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft

Conversation

umagmrit
Copy link
Contributor

Mariadb master-master setup

Two example hostnames will be used throughout this process.
master1.example.com (Primary master) master2.example.com (Secondary master)

zmmysqlenable-mmr : Enable replication on both servers
zmmysqlstart-mmr : Start replication between both servers

Data to have before starting

The below data we should have for both mariadb servers before starting mariadb master-master setup
zimbra_mysql_password
mysql_replicator_password
mysql_port

Enable replication on both servers

  • On both mariadb servers set below values

    zmlocalconfig -e maridb_master1="master1.example.com:7306"
    zmlocalconfig -e maridb_master2="master2.example.com:7306"

  • Run zmmysqlenable-mmr on both mariadb servers

    zmmysqlenable-mmr will do the following steps

  1. Add the following to /opt/zimbra/conf/my.cnf

    server-id
    log_bin
    binlog_format
    remove bind-address entry
    
  2. Create replication user

  3. restart mysql

  • Run zmmysqlstart-mmr on both mariadb servers

    zmmysqlstart-mmr will require zimbra_mysql_password , mysql_replicator_password

    zmmysqlstart-mmr will do the following steps

  1.   Get inputs `zimbra_mysql_password` , `mysql_replicator_password` from user
    
  2.   Get `MASTER_LOG_FILE` and `MASTER_LOG_POS`
    
  3.   Stop Mysql Slave thread
    
  4.   Set `MASTER_LOG_FILE` and `MASTER_LOG_POS`
    
  5.   Star Mysql Slave thread
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant