I am trying to configure MySQL cluster under three Windows 7 machines with disabled firewall, cluster information is like the following:
2 hosts with each running 1 data node
3rd host running management node and 2 MySQL Servers (
MySQLD
)MySQL cluster application has been downloaded from http://dev.mysql.com/downloads/cluster/
On each machine I have created two folder inside
C:\MySQL_Cluster\My_Cluster\
with the following names: conf and dataData folder from the previous step has been copied from MySQL cluster application data folder.
the MySQL server application has been also configured in the environment variable
MySQL config file has contain the following:
[ndbd default]
noofreplicas=2
datadir=C:\MySQL_Cluster\My_Cluster\data
[ndbd]
hostname=host_nod_1
Nodeid=2
[ndbd]
hostname=host_nod_2
Nodeid=3
[ndb_mgmd]
Nodeid=1
hostname=host_management
[mysqld]
Nodeid=101
hostname=host_management
[mysqld]
Nodeid=102
hostname=host_management
My.cnf
contain the following:
My1.cnf
:
[mysqld]
ndb-nodeid=101
ndbcluster
datadir=C:\MySQL_Cluster\My_Cluster\data\mysqld_1
Port=1111
ndb-connectstring=host_management:1186
My2.cnf
:
[mysqld]
ndb-nodeid=101
ndbcluster
datadir=C:\MySQL_Cluster\My_Cluster\data\mysqld_1
Port=2222
ndb-connectstring=host_management:1186
- to start the management node I used the following command:
C:\mysql\cluster\bin>ndb_mgmd --initial -f C:\MySQL_Cluster\My_Cluster\conf\config.ini --configdir=C:\MySQL_Cluster\My_Cluster\conf
to start data nodes I used the following command on each node:
C:\mysql\cluster\bin>ndbd -c host_management:1186 --initialto start API node (MySQL node) I used the following commands:
C:\>MySQL_Cluster\My_Cluster\data\mysqld_1> mysqld --install My1111 --defaults-file="C:\MySQL_Cluster\My_Cluster\conf\my1111.cnf"
***************************************************************************************************************
C:\>MySQL_Cluster\My_Cluster\data\mysqld_2> mysqld --install My2222 --defaults-file="C:\MySQL_Cluster\My_Cluster\conf\my2222.cnf"
- when I checked management using the following command it retains the result:
C:\mysql\cluster\bin>ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @host_nod_1 (mysql-5.6.15 ndb-7.3.4, Nodegroup: 0, *)
id=3 @host_nod_2 (mysql-5.6.15 ndb-7.3.4, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @host_management (mysql-5.6.15 ndb-7.3.4)
[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from host_management)
id=5 (not connected, accepting connect from host_management)
- if I connect for example to MySQL1 and create a table:
create table test.t1(id int) ENGINE=NDBCLUSTER;
I've got the following error and warnings:
ERROR 157 (HY000): Could not connect to storage engine
Warning | 1296 | Got error 4009 'Cluster Failure' from NDB. Could not acquire
global schema lock
Warning | 1296 | Got error 4009 'Cluster Failure' from NDB
Warning | 1296 | Got error 4009 'Cluster Failure' from NDB
what did I miss in my configuration?
Aucun commentaire:
Enregistrer un commentaire