31.07.2013 Views

MySQL Cluster Tutorial - cdn.oreillystatic.com

MySQL Cluster Tutorial - cdn.oreillystatic.com

MySQL Cluster Tutorial - cdn.oreillystatic.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ndb_mgm> show<br />

Connected to Management Server at: localhost:1186<br />

<strong>Cluster</strong> Configuration<br />

---------------------<br />

[ndbd(NDB)] 2 node(s)<br />

id=1 (not connected, accepting connect from 192.168.0.3)<br />

id=2 (not connected, accepting connect from 192.168.0.4)<br />

[ndb_mgmd(MGM)] 2 node(s)<br />

id=101 @192.168.0.3 (mysql-5.1.34 ndb-7.0.6)<br />

id=102 (not connected, accepting connect from 192.168.0.4)<br />

[mysqld(API)] 2 node(s)<br />

id=51 (not connected, accepting connect from 192.168.0.3)<br />

id=52 (not connected, accepting connect from 192.168.0.4)<br />

Start Data Nodes<br />

192.168.0.3: ndbd -c localhost:1186<br />

192.168.0.4: ndbd -c localhost:1186<br />

192.168.0.3: ndb_mgm<br />

ndb_mgm> show<br />

Connected to Management Server at: 192.168.0.4:1186<br />

<strong>Cluster</strong> Configuration<br />

---------------------<br />

[ndbd(NDB)] 2 node(s)<br />

id=1 @127.0.0.1 (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)<br />

id=2 @192.168.0.4 (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0)<br />

[ndb_mgmd(MGM)] 2 node(s)<br />

id=101 (not connected, accepting connect from 192.168.0.3)<br />

id=102 @192.168.0.4 (mysql-5.1.34 ndb-7.0.6)<br />

[mysqld(API)] 2 node(s)<br />

id=51 (not connected, accepting connect from 192.168.0.3)<br />

id=52 (not connected, accepting connect from 192.168.0.4)<br />

Note: only use the --intial option when starting the data nodes for the very first time as<br />

it erases any existing data in the database!<br />

Wait until all data nodes have started before the next step.<br />

Start <strong>MySQL</strong> Server(s)<br />

192.168.0.3: mysqld --defaults-file=conf/my.1.conf &<br />

192.168.0.4: mysqld --defaults-file=conf/my.2.conf &<br />

192.168.0.3: ndb_mgm<br />

Copyright © 2010, Oracle and/or its affiliates. All rights reserved. 14/81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!