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.

Example configuration<br />

Throughout the example, the <strong>MySQL</strong> <strong>Cluster</strong> configuration shown in Figure 4 is used.<br />

Figure 4: <strong>MySQL</strong> <strong>Cluster</strong> configuration used in example<br />

Installing, configuring, running & accessing <strong>MySQL</strong> <strong>Cluster</strong> Manager<br />

The agent must be installed and run on each host in the <strong>Cluster</strong>:<br />

1. Expand the downloaded tar-ball into a known directory (in this example we use<br />

/usr/local/mcm)<br />

2. Copy the /usr/local/mcm/etc/mysql-cluster-manager.ini to /home/billy/mcm/ and<br />

edit it:<br />

[mysql-proxy]<br />

plugins=manager<br />

log-file = mysql-manager-agent.log<br />

log-level = message<br />

manager-directory=/home/billy/mcm/<br />

3. Launch the agent process:<br />

$ /usr/local/mcm/bin/mysql-cluster-manager --defaults-file=/home/billy/mcm/<br />

mysql-cluster-manager.ini &<br />

4. Access any of the agents from any machine (that has the mysql client installed):<br />

$ mysql -h 192.168.0.10 -P 1862 -u admin -p --prompt='mcm> '<br />

Enter password: super<br />

Wel<strong>com</strong>e to the <strong>MySQL</strong> monitor. Commands end with ; or \g.<br />

Your <strong>MySQL</strong> connection id is 1<br />

Server version: 1.0.1-agent-manager <strong>MySQL</strong> <strong>Cluster</strong> Manager<br />

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.<br />

mcm><br />

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

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

Saved successfully!

Ooh no, something went wrong!