Practice of Programming

プログラム とか Linuxとかの話題

MMM for multiple cluster

These days, I'm using MMM(Multi-Master Replication Manager).
MMM is for the cluster which has one writer role and some reader roles.
If you have some master databases, you have to separate configuration file for their master databases like the following:

mmm_mond_cluster1.conf
mmm_mond_cluster2.conf

And you have to use command like this:

# mmm_control @cluster1 show
# mmm_control @cluster2 show

mmm_mond must be ran for each cluster. So, you must specify pid file and port(write them in monitord configuration) and set CLUSTER variable in each mmm_monitord init script.


You must write same number of init script as number of clusters.

/etc/init.d/mysql-mmm-monitor_cluster1
/etc/init.d/mysql-mmm-monitor_cluster2

Their difference is only the value of CLUSTER variable.

Check the following.