Mysql – Does thesqld –ndb-cluster need to be run on MySQL Cluster data nodes

MySQLndbcluster

I have my management node and sql node on the same server, and 2 data nodes (3 machines in total). Do I need to run ./mysqld –ndb-cluster (or /etc/init.d/mysql-server start) on 1) the data nodes, or 2) on the sql node, or 3) on both?

I am following this which doesn't seem to specify.
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-install-first-start.html

Thanks.

Best Answer

There are three types of nodes

  • SQL
  • Storage (Data)
  • Management

According to MySQL Clustering, page 7 paragraphs 3,4 say:

Storage Nodes

Stroage nodes store the fragments of data that make up the tables held in a cluster and the early work in processing queries. Storage nodes require a large amount of RAM and relatively high-performance machines. The bulk of the processing is done on the storage nodes., and these are the nodes that an administrator spends most of his or her time tweaking. They are completetly controlled the the management node via the configuration file and management client.

SQL Nodes

SQL nodes, which run on standard MySQL servers, are the nodes that applications can connect to, In small simple clsuters, these nodes are often run on the same physical servers as the storage nodes. Essentially, SQL nodes provides the "face" to the cluster and operate exactly as standard MySQL servers. They then connect to the storage nodes behind, which do the early processing on the queries and return the results for final processing at the SQL nodes. The amount of processing done on the SQL and storage nodes changes form query to query.

Based on this, you could run mysqld on a Storage Node if the dataset is small. You are not obligated to do so. It is preferable if you had a separate Storage Node and a separate SQL node. If you have separate Storage and SQL nodes, then do not run mysqld on the Storage Node.