• Increase font size
  • Default font size
  • Decrease font size
Web Development : Knowledgebase : MySQL Cluster : Starting a MySQL Cluster

Starting a MySQL Cluster

How to get the whole darn MySQL Cluster system running!

From the Management Node:

Goto the /var/lib/mysql-cluster directory (or wherever your cluster config.ini is)

  1. run ndb_mgmd - This starts the server management daemon.
  2. run ndb_mgm - This puts you in the Management Console

From the Management Console you have a couple commands available to you:

  • SHOW -> Shows the nodes in your configuration, their ip addresses and current status.
  • ALL STATUS -> Shows the status of the data nodes. Very useful when you want to know what loading stage a data node is in.

From EACH of the data nodes:

  • Run ndbd - This starts the NDB daemon for the data node. (this command can be run from wherever) The data node will check the my.cnf to find the address to use to connect to the management server.
  • NOTE: if this is your first time running the cluster, or want to clear the cluster data files, run ndbd --initial

From the MySQL API Nodes:

After the management node and data nodes are online, bring up your MySQL API nodes.

  • etc/init.d/mysql start -> If the init.d file was setup, use it to launch the mysqld process.

Troubleshooting:

Problem: MySQL API Nodes won't start.

Solution(s):

  1. Firewill issues, either on the API node, or MGM node. Make sure all nodes can cross communicate.
  2. Filesytem rights. MySQL is picky.
    - chown -R root:mysql /usr/local/mysql
    - chown -R mysql:mysql /var/lib/mysql

Conclusion

If everything went well, you should have a cluster online and operational.

 
Posted By: Cory S.