Some common errors when installing and deploying MySQL Clusters
- Tram Ho
Preamble
The story is about an Intern System Admin when asked by the Leader to learn about the MySQL model including its implementation and how it works. However, learning something new is never easy, so this Intern also makes pretty silly mistakes that can take up to a day to fix. Now I would like to allow you to replace this silly Intern to share the errors that have been encountered, hoping you will save some time.
Error Node MySQL API not connected, accept connect from
The above error can be caused by many reasons: no network connection, unreasonable NodeID, port conflict, etc. However, if you install it according to the steps as in this installation guide article , it still fails. This is mostly because SELinux ( Security-Enhanced Linux ) has blocked the connection. The fix is extremely simple: OFF SELinux.
Step 1: Access to the SELinux configuration file under the path /etc/selinux/config switch from able to disabled.
Step 2: Restart the Service on both Management Node and SQL API Node. 99% success rate.
On Management Node:
sudo ndb_mgmd --initial --config-file=/your_config_directory/config.ini
On Management Node:
sudo service mysql restart
Using Engine InnoDB
If you do not pay attention when exporting the database from very easy software, the dump will have additional factors such as
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
This will inadvertently make this table unusable in the default MySQL Cluster by using Engine NDB.
Error starting MySQL API Node before Data Node
With this silly error, it took me almost an hour to find errors all over google. Simply start the ndbd service on the Data Node before starting the mysql service on the SQL API Node.
The standard boot order would be: Management Node => Data Node => API Node.
End
Hope you will save some time when facing the same problem. The next article I will explain how it works between nodes in the MySQL Clusters model. Have a nice day!
Refer
https://codefaq.org/server/how-to-fix-mysql-cluster-not-connected-accepting-connect-from-error/ https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-replication-conflict-resolution.html