Description:
- First we install from the ZIP (32bits) on two servers (win7)
- Yes, there are only 2, both run a managernode, datanode and mysql daemon...
- We start the nodes as follows (cmd as Administrator):
( According to http://downloads.mysql.com/tutorials/cluster/GetMySQLClusterRunningWindows.pdf )
# start /B ndb_mgmd -f "D:/cluster/clusterdata/conf/config.ini" --initial --configdir="D:/cluster/clusterdata/conf"
# start /B ndbd -c localhost:1186
# start /B mysqld --defaults-file="D:/cluster/clusterdata/conf/my.cnf"
- We can import a existing database with MySQL WorkBench 5.2CE
- Data is in sync, works!
- We stop by executing:
# mysqladmin -u root -h 127.0.0.1 -P3306 shutdown
# ndb_mgm -e shutdown
- We check and wait for a while to let it shutdown properly.
- Cluster runs ok, so lets make/install windows services:
# D:\cluster\mysqlc\bin\ndb_mgmd --install --config-file="D:/cluster/clusterdata/conf/config.ini" --configdir="D:/cluster/clusterdata/conf"
# D:\cluster\mysqlc\bin\ndbd --install -c localhost:1186
# D:\cluster\mysqlc\bin\mysqld --install "MySQL Daemon" --defaults-file="D:/cluster/clusterdata/conf/my.cnf"
All of the services where successfully created..
- So, reboot the servers.
- But here are the problems! Only the MySQL Daemon is running but
the manager node and the datanode are not running!
Or only the managernode is running with a reboot.
These two combinations happen.
Here are the configs:
- - - - - - - - - - - -== config.ini ==- - - - - - - - - - - - -
[ndbd default]
NoOfReplicas=2
[ndb_mgmd]
HostName=192.168.175.51
ArbitrationRank=0
DataDir=D:/cluster/clusterdata/ndb_data
NodeId = 101
[ndb_mgmd]
HostName=192.168.175.52
ArbitrationRank=0
DataDir=D:/cluster/clusterdata/ndb_data
NodeId = 102
[ndbd]
HostName=192.168.175.51
NodeId=1
[ndbd]
HostName=192.168.175.52
NodeId=2
[mysqld]
HostName=192.168.175.51
NodeId=51
[mysqld]
HostName=192.168.175.52
NodeId=52
- - - - - - - - - - - -== my.cnf (server-id=51) ==- - - - - - - - - - - - -
[mysqld]
ndbcluster
ndb-connectstring=localhost
default-storage-engine=ndbcluster
datadir=D:/cluster/clusterdata/mysqld_data
basedir=D:/cluster/mysqlc
port=3306
server-id=51
log-bin=iSCAPE_PC1-bin
- - - - - - - - - - - -== my.cnf (server-id=52) ==- - - - - - - - - - - - -
[mysqld]
ndbcluster
ndb-connectstring=localhost
default-storage-engine=ndbcluster
datadir=D:/cluster/clusterdata/mysqld_data
basedir=D:/cluster/mysqlc
port=3306
server-id=52
log-bin=iSCAPE_PC2-bin
How to repeat:
See "Description"