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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

mcm> show status --process mycluster;<br />

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

| Id | Process | Host | Status | Nodegroup |<br />

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

| 1 | ndb_mgmd | 192.168.0.10 | running | |<br />

| 2 | ndb_mgmd | 192.168.0.11 | running | |<br />

| 3 | ndbd | 192.168.0.12 | running | 0 |<br />

| 4 | ndbd | 192.168.0.13 | running | 0 |<br />

| 5 | ndbd | 192.168.0.12 | running | 1 |<br />

| 6 | ndbd | 192.168.0.13 | running | 1 |<br />

| 7 | mysqld | 192.168.0.10 | running | |<br />

| 8 | mysqld | 192.168.0.11 | running | |<br />

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

Checking and setting <strong>MySQL</strong> <strong>Cluster</strong> parameters<br />

When using <strong>MySQL</strong> <strong>Cluster</strong> Manager, the administrator reviews and changes all<br />

configuration parameters using the get and set <strong>com</strong>mands rather than editing the<br />

configuration files directly. For both get and set you can control the scope of the attributes<br />

being read or updated. For example, you can specify that the attribute applies to all nodes,<br />

all nodes of a particular class (such as all data nodes) or to a specific node. Additionally,<br />

when reading attributes you can provide a specific attribute name or ask for all applicable<br />

attributes as well as indicating whether you wish to see the attributes still with their default<br />

values or just those that have been overwritten.<br />

There follow some examples of getting and setting attributes.<br />

1. Fetch all parameters that apply to all data nodes, including defaults<br />

mcm> get -d :ndbd mycluster;<br />

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

| Name | Value | Process1 | Id1 | Process2 | Id2 | Level | Comment |<br />

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

| __ndbmt_lqh_threads | NULL | ndbd | 3 | | | Default | |<br />

| __ndbmt_lqh_workers | NULL | ndbd | 3 | | | Default | |<br />

| Arbitration | NULL | ndbd | 3 | | | Default | |<br />

........ : : : : : : : :<br />

| __ndbmt_lqh_threads | NULL | ndbd | 4 | | | Default | |<br />

| __ndbmt_lqh_workers | NULL | ndbd | 4 | | | Default | |<br />

| Arbitration | NULL | ndbd | 4 | | | Default | |<br />

| ArbitrationTimeout | 3000 | ndbd | 4 | | | Default | |<br />

........ : : : : : : : :<br />

| __ndbmt_lqh_threads | NULL | ndbd | 5 | | | Default | |<br />

........ : : : : : : : :<br />

| __ndbmt_lqh_threads | NULL | ndbd | 6 | | | Default | |<br />

........ : : : : : : : :<br />

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

2. Fetch the values of parameters (excluding defaults) for mysqld with ID=7:<br />

mcm> get :mysqld:7 mycluster;<br />

+------------+--------------------------------------------------+----------+------+-...<br />

| Name | Value | Process1 | Id1 |<br />

+------------+--------------------------------------------------+----------+------+-...<br />

| datadir | /usr/local/mcm/manager/clusters/mycluster/7/data | mysqld | 7 | ...<br />

| HostName | ws1 | mysqld | 7 | ...<br />

| ndb-nodeid | 7 | mysqld | 7 | ...<br />

| ndbcluster | | mysqld | 7 | ...<br />

| NodeId | 7 | mysqld | 7 | ...<br />

+------------+--------------------------------------------------+----------+------+-...<br />

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

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

Saved successfully!

Ooh no, something went wrong!