Once the config.ini has been created the cluster can be started.
Step 1. On a Management Node execute the ndb_mgmd command with the confi.ini file path:
ndb_mgmd -f /path/to/config.ini
[root@DB-06 ~]# ndb_mgmd -f /var/lib/mysql-cluster/config.ini
MySQL Cluster Management Server mysql-8.0.23 ndb-8.0.23
Step 2. On the Data Nodes execute the ndbd or ndbmtd command to start the respective process after setting the option file with the ndb connection string:
In Linux the option file is located at /etc/my.cnf and in Microsoft Windows it is located at C:\ProgramData\MySQL\MySQL Server <version>\my.ini
[mysql_cluster]
# Options for NDB Cluster processes:
ndb-connectstring=10.21.227.36 # location of management server
ndbd
ndbmtd
[root@DB-09 ~]# ndbmtd
2021-03-05 00:55:20 [ndbd] INFO -- Angel connected to '10.21.227.36:1186'
2021-03-05 00:55:20 [ndbd] INFO -- Angel allocated nodeid: 2
Ensure the firewall is not blocking the ndbd, ndbmtd, or ndb_mgmd process on the respective node.
Data Nodes communicate with the Management Node on port 118. Ensure this port is open for in the firewall.
Step 3. Start the MySQL process on the SQL Nodes after setting the option file properties for the ndb cluster.
[mysqld]
# Options for mysqld process:
ndbcluster # run NDB storage engine
ndb-use-exact-count=0
ndb-index-stat-enable=0
ndb-force-send=1
optimizer-switch=engine_condition_pushdown=on
default_storage_engine=ndbcluster
port=3306
max_allowed_packet=1073741824
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql_cluster]
# Options for NDB Cluster processes:
ndb-connectstring=10.21.227.36 # location of management server
Once the option file has been created/edited on the SQL nodes, the MySQL cluster can be started.
Microsoft Windows - Run the following command in a PowerShell terminal (for those running MySQL 8 the service name is mysql80, for mysql 5.7 it is mysql57):
net start MySQL80
Linux - Run the following command in a terminal:
systemctl start mysqld
MySQL NDB Cluster (MySQL Cluster) is a deployment type for MySQL providing high availability and scalability.