This MySQL server is a part of the cluster, so it also must know how to access a management node to obtain the cluster configuration data. The default behavior is to look for the management node on localhost . However, should you need to specify that its location is elsewhere, this can be done in my.cnf , or with the mysql  client. Before the NDB  storage engine can be used, at least one management node must be operational, as well as any desired data nodes. 

For more information about --ndbcluster  and other mysqld  options specific to NDB Cluster, see MySQL Server Options for NDB Cluster. 

For general information about installing NDB Cluster, see Section 23.2, “NDB Cluster Installation” . 

## 23.3.1 Quick Test Setup of NDB Cluster 

To familiarize you with the basics, we describe the simplest possible configuration for a functional NDB Cluster. After this, you should be able to design your desired setup from the information provided in the other relevant sections of this chapter. 

First, you need to create a configuration directory such as /var/lib/mysql-cluster , by executing the following command as the system root  user: 

shell> mkdir /var/lib/mysql-cluster 

In this directory, create a file named config.ini  that contains the following information. Substitute appropriate values for HostName  and DataDir  as necessary for your system. 

# file "config.ini" - showing minimal setup consisting of 1 data node, # 1 management server, and 3 MySQL servers. # The empty default sections are not required, and are shown only for # the sake of completeness. # Data nodes must provide a hostname but MySQL Servers are not required # to do so. # If you don’t know the hostname for your machine, use localhost. # The DataDir parameter also has a default value, but it is recommended to # set it explicitly. # Note: [db], [api], and [mgm] are aliases for [ndbd], [mysqld], and [ndb_mgmd], # respectively. [db] is deprecated and should not be used in new installations. [ndbd default] NoOfReplicas= 1 [mysqld default] [ndb_mgmd default] [tcp default] [ndb_mgmd] HostName= myhost.example.com [ndbd] HostName= myhost.example.com DataDir= /var/lib/mysql-cluster [mysqld] [mysqld] [mysqld] 

You can now start the ndb_mgmd  management server. By default, it attempts to read the config.ini file in its current working directory, so change location into the directory where the file is located and then invoke ndb_mgmd : 

shell> cd /var/lib/mysql-cluster shell> ndb_mgmd 

Then start a single data node by running ndbd : 

