This section describes the basics for planning, installing,
configuring, and running a MySQL Cluster. Whereas the examples in
Section 18.3, “Configuration of MySQL Cluster” provide more in-depth
information on a variety of clustering options and configuration,
the result of following the guidelines and procedures outlined here
should be a usable MySQL Cluster which meets the
minimum requirements for availability and
safeguarding of data.

Network addressing.
In the interest of simplicity (and reliability), this
How-To uses only numeric IP addresses.
However, if DNS resolution is available on your network, it is
possible to use host names in lieu of IP addresses in configuring
Cluster. Alternatively, you can use the hosts
file (typically /etc/hosts for Linux and
other Unix-like operating systems,
C:\WINDOWS\system32\drivers\etc\hosts on
Windows, or your operating system's equivalent) for providing
a means to do host lookup if such is available.

Potential hosts file issues.
A common problem when trying to use host names for Cluster nodes
arises because of the way in which some operating systems
(including some Linux distributions) set up the system's own
host name in the /etc/hosts during
installation. Consider two machines with the host names
ndb1 and ndb2, both in the
cluster network domain. Red Hat Linux
(including some derivatives such as CentOS and Fedora) places the
following entries in these machines'
/etc/hosts files:

In both instances, ndb1 routes
ndb1.cluster to a loopback IP address, but gets a
public IP address from DNS for ndb2.cluster,
while ndb2 routes ndb2.cluster
to a loopback address and obtains a public address for
ndb1.cluster. The result is that each data node
connects to the management server, but cannot tell when any other
data nodes have connected, and so the data nodes appear to hang
while starting.

Caution

You cannot mix localhost and other host names
or IP addresses in config.ini. For these
reasons, the solution in such cases (other than to use IP
addresses for allconfig.iniHostName
entries) is to remove the fully qualified host names from
/etc/hosts and use these in
config.ini for all cluster hosts.

Host computer type.
Each host computer in our installation scenario is an Intel-based
desktop PC running a supported operating system installed to disk
in a standard configuration, and running no unnecessary services.
The core operating system with standard TCP/IP networking
capabilities should be sufficient. Also for the sake of
simplicity, we also assume that the file systems on all hosts are
set up identically. In the event that they are not, you should
adapt these instructions accordingly.

Network hardware.
Standard 100 Mbps or 1 gigabit Ethernet cards are installed on
each machine, along with the proper drivers for the cards, and
that all four hosts are connected through a standard-issue
Ethernet networking appliance such as a switch. (All machines
should use network cards with the same throughout. That is, all
four machines in the cluster should have 100 Mbps cards
or all four machines should have 1 Gbps
cards.) MySQL Cluster works in a 100 Mbps network; however,
gigabit Ethernet provides better performance.

Important

MySQL Cluster is not intended for use in a
network for which throughput is less than 100 Mbps or which
experiences a high degree of latency. For this reason (among
others), attempting to run a MySQL Cluster over a wide area
network such as the Internet is not likely to be successful, and
is not supported in production.

Sample data.
We use the world database which is available
for download from the MySQL Web site (see
http://dev.mysql.com/doc/index-other.html). We assume that
each machine has sufficient memory for running the operating
system, required MySQL Cluster processes, and (on the data nodes)
storing the database.