I'm trying to set up a basic NDB cluster, the data nodes register correctly but the mysqld API node doesn't accept
Connected to Management Server at: 174.138.80.168:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @104.131.16.252 (mysql-5.6.37 ndb-7.4.16, Nodegroup: 0, *)
id=3 @174.138.80.126 (mysql-5.6.37 ndb-7.4.16, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @174.138.80.168 (mysql-5.6.37 ndb-7.4.16)
[mysqld(API)] 1 node(s)
id=4 (not connected, accepting connect from manager.mysql.cluster)
Manager Node's my.cnf
[ndb_mgmd]
config-dir=/usr/local/mysql/mysql-cluster
config-file=/usr/local/mysql/mysql-cluster/config.ini
# MySQL Config
[mysqld]
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
user=mysql
# Run ndb storage engine
ndbcluster
# IP address management node
ndb-connectstring=174.138.80.168
# MySQL Pid and Log
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Management Node's /var/lib/mysql-cluster/config.ini file
[ndb_mgmd]
# Management process options:
hostname=manager.mysql.cluster # Hostname of the manager
[ndbd]
hostname=node1.mysql.cluster # Hostname of the first data node
datadir=/var/lib/mysql-cluster # Remote directory for the data files
[ndbd]
hostname=node2.mysql.cluster # Hostname of the second data node
datadir=/var/lib/mysql-cluster # Remote directory for the data files
[mysqld]
# SQL node options:
hostname=manager.mysql.cluster
Each of the data node's /etc/my.cnf files:
# MySQL Config
[mysqld]
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
user=mysql
# Run ndb storage engine
ndbcluster
# IP address management node
ndb-connectstring=174.138.80.168
[mysql_cluster]
# IP address management node
ndb-connectstring=174.138.80.168
# MySQL Pid and Log
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Thanks
Best Answer
I guess I had that issue before
double check whether mysql has been started or not
run following command and see
active status should be
before set up cluster