The Structure of config.ini

The config.ini file has several parts. You have already been introduced to a very simple config.ini file. You can find a list of all the sections and what you can put in them in the Chapter1.

The config.ini file has sections for settings for management, storage, and SQL nodes. Within each section are defaults that apply to all nodes of that type, and you must have one section per node (even if you have no parameters in it).

These are the sections:

#
# STORAGE NODES
#

[NDBD DEFAULT]
# In here you put the settings that apply to all storage nodes

[NDBD]
# In here you put the settings for one individual storage node
# You must have one [NBDD] section for EACH storage node

#
# MANAGEMENT NODES
#

[NDB_MGMD DEFAULT]
# In here you put the settings that apply to all management nodes

[NDB_MGMD]
# In here you put the settings for one individual management node
# You must have one [NBD_MGM] section for EACH management node

#
# SQL NODES
#

[MYSQLD DEFAULT]
# In here you put the settings that apply to all SQL nodes

[MYSQLD]
# In here you put the settings for one individual SQL node
# You must have one [MYSQLD] section for EACH SQL node

Note that this block of text is in code form. We suggest that you use this as your config.ini template; you can then easily add parameters to the correct block. You can download this file from this book's website, www.mysql-cluster.com.

The following sections cover the parameters you can set in each section.

All Nodes

Two options can go under the [NDBD], [NDB_MGM], and [MYSQLD] sections: Id and HostName. It is conventional to define HostName for all nodes.

Id

Each node in a cluster has a unique identity, ranging from 1 to 64, inclusive. This ID is used by all internal cluster messages for addressing the node, and it is also used to identify the node in log files and create output files that can be identified with the node. If you do not set this, the management daemon assigns each node the next free ID to each node that connects (and it assigns itself an ID of 1).

If you choose to run multiple management nodes, you must set the IDs. If you are running a large cluster, you may want to set the IDs so you know without question that the same node will always have the same ID, however often it is perfectly satisfactory to let the management daemon just assign the IDs.

HostName

The HostName parameter defines the hostname or IP address of the computer that the storage node is to reside on (for example, HostName=10.0.0.2).

We suggest that you use IP addresses whenever possible. If you use hostnames, you need to make sure that both your forward and reverse DNS lookups are in perfect order, and if you experience problems, the first thing you should try is to switch the hostnames for IP addresses and see if that fixes the problem.



MySQL Clustering
MySQL Clustering
ISBN: 0672328550
EAN: 2147483647
Year: N/A
Pages: 93

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net