When you try building up MySQL Cluster and installed the MySQL Management Server to your database server. When running a command
ndb_mgm -e show, you’ll notice that the API is not connected and when this happen, your nodes cannot pull the MySQL query.
This error usually happen when your server is blocked from a firewall or from SELinux.
SELinux Issue with MySQL Cluster
To fix this issue with SELinux, is to simply disable it, its the quickest alternative to test your MySQL cluster if properly working. But this will risk some of the ownership policy of your server and could be insecure.
I suggest you to do this in development stage only. To disable SELinux completely, simply
vim /etc/selinux/config. Enter this:
If you’d like to return to original, the default value is “enforcing”. Reboot
sudo reboot to make effect.
But the best alternative is by just changing the ownership of all of the folder for mysql server. The folder for mysql is usually located at /etc/mysql, you need to change the owner from root to mysql.
sudo chown -R mysql:mysql /etc/mysql
Once you have check and verified that the firewall is not blocking the connection.
Run again the ndb_mgmd with reset configuration.
sudo ndb_mgmd --initial --config-file=/your_config_directory/config.ini
Then restart mysql.
sudo service mysql restart
Then check if its working now, by running this command
ndb_mgm -e show.
Connected to Management Server at: 10.168.132.156:1186 Cluster Configuration --------------------- [ndbd(NDB)] 1 node(s) id=2 @10.168.161.6 (mysql-8.0.19 ndb-8.0.19, Nodegroup: 0, *) [ndb_mgmd(MGM)] 1 node(s) id=1 @10.168.132.156 (mysql-8.0.19 ndb-8.0.19) [mysqld(API)] 1 node(s) id=101 @10.168.132.156 (mysql-8.0.19 ndb-8.0.19)