Skip to content

Instantly share code, notes, and snippets.

Last active February 23, 2021 14:19
What would you like to do?
1) Install MCM
- Download MCM install package from
- Install MCM package
Guide on run MCM using systemd:
2) Configure MCM
- set manager-directory to where you want to store cluster data on disk
- set log-file to where you want to store the mcm logfile.
3) Start MCM on all nodes/servers where you will run NDB cluster processes
mcmd --defaults-file=./mcmd.ini --daemon
4) Download and unpack NDB binaries on all nodes/servers where you want to run NDB processes
You can download latest NDB binaries from here:
For example:
mkdir /opt/mysql/ndb
cd /opt/mysql/ndb
tar xzf mysql-cluster-8.0.23-linux-glibc2.12-x86_64.tar.gz
5) Create your cluster (see SIMPLE_CLUSTER file below.
mcm -e"show status -r mycluster"
---- File SIMPLE_CLUSTER ----
create site --hosts= mysite;
add package --basedir=/opt/mysql/ndb/mysql-cluster-8.0.23-linux-glibc2.12-x86_64 ndb8023;
create cluster --package=ndb8023 --processhosts=ndb_mgmd@,ndbmtd@,ndbmtd@ mycluster;
add process --processhosts=mysqld:146@,mysqld:148@ mycluster;
add process --processhosts=ndbapi@,ndbapi@ mycluster;
add process --processhosts=ndbapi@,ndbapi@ mycluster;
set port:mysqld:146=53306 mycluster;
set port:mysqld:148=53307 mycluster;
set ndb_autoincrement_prefetch_sz:mysqld=513 mycluster;
set ndb-cluster-connection-pool:mysqld=2 mycluster;
set ndb-batch-size:mysqld=16M mycluster;
start cluster mycluster;
show status -r mycluster;
---- end file ----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment