Initial Configuration of MySQL Cluster
1537
After installing from RPM, you still need to configure the cluster as discussed in
Section 17.2.2, “Initial
Configuration of MySQL Cluster”
.
17.2.1.3. Building MySQL Cluster from Source on Linux
This section provides information about compiling MySQL Cluster on Linux and other Unix-like
platforms.To build MySQL Cluster, you need the MySQL 5.0 source archive available from
http://
dev.mysql.com/downloads/
. Building MySQL Cluster from source is similar to building the
standard MySQL Server, although it differs in a few key respects discussed here. For general
information about building MySQL from source, see
Section 2.17, “Installing MySQL from Source”
.
In addition to any other
configure
options you wish to use, be sure to include
--with-
ndbcluster
. This option causes the binaries for the management nodes, data nodes, and other
MySQL Cluster programs to be built; it also causes
mysqld
to be compiled with
NDB
storage engine
support.
After you have run
make && make install
(or your system's equivalent), the result is similar to
what is obtained by unpacking a precompiled binary to the same location. However, the layout can
differ. These differences are covered in the next few paragraphs.
Management nodes.
When building from source and running the default
make install
, the
management server binary (
ndb_mgmd
) is placed in
/usr/local/mysql/libexec
, while the
management client binary (
ndb_mgm
) can be found in
/usr/local/mysql/bin
. Only
ndb_mgmd
is
required to be present on a management node host; however, it is also a good idea to have
ndb_mgm
present on the same host machine. Neither of these executables requires a specific location on the
host machine's file system.
Data nodes.
The only executable required on a data node host is
ndbd
(
mysqld
, for example, does
not have to be present on the host machine). By default when doing a source build, this file is placed
in the directory
/usr/local/mysql/libexec
. For installing on multiple data node hosts, only
ndbd
need be copied to the other host machine or machines. (This assumes that all data node hosts use
the same architecture and operating system; otherwise you may need to compile separately for each
different platform.)
ndbd
need not be in any particular location on the host's file system, as long as the
location is known.
SQL nodes.
If you compile MySQL with clustering support, and perform the default installation
(using
make install
as the system
root
user),
mysqld
is placed in
/usr/local/mysql/bin
.
Follow the steps given in
Section 2.17, “Installing MySQL from Source”
to make
mysqld
ready for use.
If you want to run multiple SQL nodes, you can use a copy of the same
mysqld
executable and its
associated support files on several machines. The easiest way to do this is to copy the entire
/usr/
local/mysql
directory and all directories and files contained within it to the other SQL node host or
hosts, then repeat the steps from
Section 2.17, “Installing MySQL from Source”
on each machine. If
you configure the build with a nondefault
--prefix
[121]
, you need to adjust the directory accordingly.
In
Section 17.2.2, “Initial Configuration of MySQL Cluster”
, we create configuration files for all of the
nodes in our example MySQL Cluster.
17.2.2. Initial Configuration of MySQL Cluster
For our four-node, four-host MySQL Cluster, it is necessary to write four configuration files, one per
node host.
• Each data node or SQL node requires a
my.cnf
file that provides two pieces of information: a
connectstring that tells the node where to find the management node, and a line telling the MySQL
server on this host (the machine hosting the data node) to enable the
NDBCLUSTER
storage engine.
For more information on connectstrings, see
Section 17.3.2.2, “The MySQL Cluster Connectstring”
.
• The management node needs a
config.ini
file telling it how many replicas to maintain, how much
memory to allocate for data and indexes on each data node, where to find the data nodes, where to
save data to disk on each data node, and where to find any SQL nodes.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...