<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="mysql-cluster-install-windows-initial-start">
      </a>
      25.3.2.3 Initial Startup of NDB Cluster on Windows
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045122423808">
  </a>
  <p>
   Once the NDB Cluster executables and needed configuration files
        are in place, performing an initial start of the cluster is
        simply a matter of starting the NDB Cluster executables for all
        nodes in the cluster. Each cluster node process must be started
        separately, and on the host computer where it resides. The
        management node should be started first, followed by the data
        nodes, and then finally by any SQL nodes.
  </p>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <p>
      On the management node host, issue the following command
            from the command line to start the management node process.
            The output should appear similar to what is shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa45247737"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\mysql\bin&gt;</span><span class="token command"> ndb_mgmd</span>
2010-06-23 07<span class="token punctuation">:</span>53<span class="token punctuation">:</span>34 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO <span class="token property">--</span> NDB Cluster Management Server<span class="token punctuation">.</span> mysql-8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0-ndb-8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0
2010-06-23 07<span class="token punctuation">:</span>53<span class="token punctuation">:</span>34 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO <span class="token property">--</span> Reading cluster configuration from <span class="token atrule">'config.ini'</span></code></pre>
     </div>
     <p>
      The management node process continues to print logging
            output to the console. This is normal, because the
            management node is not running as a Windows service. (If you
            have used NDB Cluster on a Unix-like platform such as Linux,
            you may notice that the management node's default
            behavior in this regard on Windows is effectively the
            opposite of its behavior on Unix systems, where it runs by
            default as a Unix daemon process. This behavior is also true
            of NDB Cluster data node processes running on Windows.) For
            this reason, do not close the window in which
      <a class="link" href="mysql-cluster-programs-ndb-mgmd.html" title="25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon">
       <span class="command">
        <strong>
         ndb_mgmd.exe
        </strong>
       </span>
      </a>
      is running; doing so kills
            the management node process. (See
      <a class="xref" href="mysql-cluster-install-windows-service.html" title="25.3.2.4 Installing NDB Cluster Processes as Windows Services">
       Section 25.3.2.4, “Installing NDB Cluster Processes as Windows Services”
      </a>
      ,
            where we show how to install and run NDB Cluster processes
            as Windows services.)
     </p>
     <p>
      The required
      <code class="option">
       -f
      </code>
      option tells the management
            node where to find the global configuration file
            (
      <code class="filename">
       config.ini
      </code>
      ). The long form of this
            option is
      <a class="link" href="mysql-cluster-programs-ndb-mgmd.html#option_ndb_mgmd_config-file">
       <code class="option">
        --config-file
       </code>
      </a>
      .
     </p>
     <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Important
      </div>
      <p>
       An NDB Cluster management node caches the configuration
              data that it reads from
       <code class="filename">
        config.ini
       </code>
       ;
              once it has created a configuration cache, it ignores the
       <code class="filename">
        config.ini
       </code>
       file on subsequent starts
              unless forced to do otherwise. This means that, if the
              management node fails to start due to an error in this
              file, you must make the management node re-read
       <code class="filename">
        config.ini
       </code>
       after you have corrected
              any errors in it. You can do this by starting
       <a class="link" href="mysql-cluster-programs-ndb-mgmd.html" title="25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon">
        <span class="command">
         <strong>
          ndb_mgmd.exe
         </strong>
        </span>
       </a>
       with the
       <a class="link" href="mysql-cluster-programs-ndb-mgmd.html#option_ndb_mgmd_reload">
        <code class="option">
         --reload
        </code>
       </a>
       or
       <a class="link" href="mysql-cluster-programs-ndb-mgmd.html#option_ndb_mgmd_initial">
        <code class="option">
         --initial
        </code>
       </a>
       option on the
              command line. Either of these options works to refresh the
              configuration cache.
      </p>
      <p>
       It is not necessary or advisable to use either of these
              options in the management node's
       <code class="filename">
        my.ini
       </code>
       file.
      </p>
     </div>
    </li>
    <li class="listitem">
     <p>
      On each of the data node hosts, run the command shown here
            to start the data node processes:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa28874870"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\mysql\bin&gt;</span><span class="token command"> ndbd</span>
2010-06-23 07<span class="token punctuation">:</span>53<span class="token punctuation">:</span>46 <span class="token punctuation">[</span>ndbd<span class="token punctuation">]</span> INFO <span class="token property">--</span> Configuration fetched from <span class="token atrule">'localhost:1186'</span><span class="token punctuation">,</span> generation<span class="token punctuation">:</span> 1</code></pre>
     </div>
     <p>
      In each case, the first line of output from the data node
            process should resemble what is shown in the preceding
            example, and is followed by additional lines of logging
            output. As with the management node process, this is normal,
            because the data node is not running as a Windows service.
            For this reason, do not close the console window in which
            the data node process is running; doing so kills
      <a class="link" href="mysql-cluster-programs-ndbd.html" title="25.5.1 ndbd — The NDB Cluster Data Node Daemon">
       <span class="command">
        <strong>
         ndbd.exe
        </strong>
       </span>
      </a>
      . (For more information, see
      <a class="xref" href="mysql-cluster-install-windows-service.html" title="25.3.2.4 Installing NDB Cluster Processes as Windows Services">
       Section 25.3.2.4, “Installing NDB Cluster Processes as Windows Services”
      </a>
      .)
     </p>
    </li>
    <li class="listitem">
     <p>
      Do not start the SQL node yet; it cannot connect to the
            cluster until the data nodes have finished starting, which
            may take some time. Instead, in a new console window on the
            management node host, start the NDB Cluster management
            client
      <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
       <span class="command">
        <strong>
         ndb_mgm.exe
        </strong>
       </span>
      </a>
      , which should be in
      <code class="filename">
       C:\mysql\bin
      </code>
      on the management node
            host. (Do not try to re-use the console window where
      <a class="link" href="mysql-cluster-programs-ndb-mgmd.html" title="25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon">
       <span class="command">
        <strong>
         ndb_mgmd.exe
        </strong>
       </span>
      </a>
      is running by typing
      <span class="keycap">
       <strong>
        CTRL
       </strong>
      </span>
      +
      <span class="keycap">
       <strong>
        C
       </strong>
      </span>
      , as this kills the
            management node.) The resulting output should look like
            this:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa19991518"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\mysql\bin&gt;</span><span class="token command"> ndb_mgm</span>
<span class="token property">--</span> NDB Cluster <span class="token property">--</span> Management Client <span class="token property">--</span>
ndb_mgm&gt;</code></pre>
     </div>
     <p>
      When the prompt
      <code class="literal">
       ndb_mgm&gt;
      </code>
      appears, this
            indicates that the management client is ready to receive NDB
            Cluster management commands. You can observe the status of
            the data nodes as they start by entering
      <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-status">
       <code class="literal">
        ALL STATUS
       </code>
      </a>
      at the
            management client prompt. This command causes a running
            report of the data nodes's startup sequence, which
            should look something like this:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa48876954"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ndbmgm"><span class="token prompt">ndb_mgm&gt;</span> <span class="token keyword">ALL</span> <span class="token keyword">STATUS</span>
Connected to Management Server at<span class="token operator">:</span> localhost<span class="token operator">:</span>1186 <span class="token punctuation">(</span>using cleartext<span class="token punctuation">)</span>
<span class="token selector">Node 2:</span> starting <span class="token punctuation">(</span>Last completed phase 3<span class="token punctuation">)</span> <span class="token punctuation">(</span>mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>
<span class="token selector">Node 3:</span> starting <span class="token punctuation">(</span>Last completed phase 3<span class="token punctuation">)</span> <span class="token punctuation">(</span>mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>

<span class="token selector">Node 2:</span> starting <span class="token punctuation">(</span>Last completed phase 4<span class="token punctuation">)</span> <span class="token punctuation">(</span>mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>
<span class="token selector">Node 3:</span> starting <span class="token punctuation">(</span>Last completed phase 4<span class="token punctuation">)</span> <span class="token punctuation">(</span>mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>

<span class="token selector">Node 2:</span> Started <span class="token punctuation">(</span>version 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>
<span class="token selector">Node 3:</span> Started <span class="token punctuation">(</span>version 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>

<span class="token prompt">ndb_mgm&gt;</span></code></pre>
     </div>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       Commands issued in the management client are not
              case-sensitive; we use uppercase as the canonical form of
              these commands, but you are not required to observe this
              convention when inputting them into the
       <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
        <span class="command">
         <strong>
          ndb_mgm
         </strong>
        </span>
       </a>
       client. For more information,
              see
       <a class="xref" href="mysql-cluster-mgm-client-commands.html" title="25.6.1 Commands in the NDB Cluster Management Client">
        Section 25.6.1, “Commands in the NDB Cluster Management Client”
       </a>
       .
      </p>
     </div>
     <p>
      The output produced by
      <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-status">
       <code class="literal">
        ALL
            STATUS
       </code>
      </a>
      is likely to vary from what is shown here,
            according to the speed at which the data nodes are able to
            start, the release version number of the NDB Cluster
            software you are using, and other factors. What is
            significant is that, when you see that both data nodes have
            started, you are ready to start the SQL node.
     </p>
     <p>
      You can leave
      <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
       <span class="command">
        <strong>
         ndb_mgm.exe
        </strong>
       </span>
      </a>
      running; it has
            no negative impact on the performance of the NDB Cluster,
            and we use it in the next step to verify that the SQL node
            is connected to the cluster after you have started it.
     </p>
    </li>
    <li class="listitem">
     <p>
      On the computer designated as the SQL node host, open a
            console window and navigate to the directory where you
            unpacked the NDB Cluster binaries (if you are following our
            example, this is
      <code class="filename">
       C:\mysql\bin
      </code>
      ).
     </p>
     <p>
      Start the SQL node by invoking
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld.exe
        </strong>
       </span>
      </a>
      from the command line, as shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa18789179"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">C:\mysql\bin&gt;</span><span class="token command"> mysqld</span> <span class="token property">--console</span></code></pre>
     </div>
     <p>
      The
      <a class="link" href="server-options.html#option_mysqld_console">
       <code class="option">
        --console
       </code>
      </a>
      option causes
            logging information to be written to the console, which can
            be helpful in the event of problems. (Once you are satisfied
            that the SQL node is running in a satisfactory manner, you
            can stop it and restart it out without the
      <a class="link" href="server-options.html#option_mysqld_console">
       <code class="option">
        --console
       </code>
      </a>
      option, so that
            logging is performed normally.)
     </p>
     <p>
      In the console window where the management client
            (
      <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
       <span class="command">
        <strong>
         ndb_mgm.exe
        </strong>
       </span>
      </a>
      ) is running on the
            management node host, enter the
      <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-show">
       <code class="literal">
        SHOW
       </code>
      </a>
      command, which
            should produce output similar to what is shown here:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-ndbmgm"><div class="docs-select-all right" id="sa3439323"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-ndbmgm"><span class="token prompt">ndb_mgm&gt;</span> <span class="token keyword">SHOW</span>
Connected to Management Server at<span class="token operator">:</span> localhost<span class="token operator">:</span>1186 <span class="token punctuation">(</span>using cleartext<span class="token punctuation">)</span>
Cluster Configuration
<span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">--</span><span class="token operator">-</span>
<span class="token selector">[ndbd(NDB)]</span>     2 node<span class="token punctuation">(</span>s<span class="token punctuation">)</span>
id<span class="token operator">=</span>2    @198<span class="token punctuation">.</span>51<span class="token punctuation">.</span>100<span class="token punctuation">.</span>30  <span class="token punctuation">(</span>Version<span class="token operator">:</span> 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">,</span> Nodegroup<span class="token operator">:</span> 0<span class="token punctuation">,</span> <span class="token operator">*</span><span class="token punctuation">)</span>
id<span class="token operator">=</span>3    @198<span class="token punctuation">.</span>51<span class="token punctuation">.</span>100<span class="token punctuation">.</span>40  <span class="token punctuation">(</span>Version<span class="token operator">:</span> 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">,</span> Nodegroup<span class="token operator">:</span> 0<span class="token punctuation">)</span>

<span class="token selector">[ndb_mgmd(MGM)]</span> 1 node<span class="token punctuation">(</span>s<span class="token punctuation">)</span>
id<span class="token operator">=</span>1    @198<span class="token punctuation">.</span>51<span class="token punctuation">.</span>100<span class="token punctuation">.</span>10  <span class="token punctuation">(</span>Version<span class="token operator">:</span> 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>

<span class="token selector">[mysqld(API)]</span>   1 node<span class="token punctuation">(</span>s<span class="token punctuation">)</span>
id<span class="token operator">=</span>4    @198<span class="token punctuation">.</span>51<span class="token punctuation">.</span>100<span class="token punctuation">.</span>20  <span class="token punctuation">(</span>Version<span class="token operator">:</span> 8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token operator">-</span>ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span></code></pre>
     </div>
     <p>
      You can also verify that the SQL node is connected to the
            NDB Cluster in the
      <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
       <span class="command">
        <strong>
         mysql
        </strong>
       </span>
      </a>
      client
            (
      <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
       <span class="command">
        <strong>
         mysql.exe
        </strong>
       </span>
      </a>
      ) using the
      <a class="link" href="show-engine.html#show-engine-ndb-status" title="SHOW ENGINE NDB STATUS">
       <code class="literal">
        SHOW ENGINE NDB STATUS
       </code>
      </a>
      statement.
     </p>
    </li>
   </ol>
  </div>
  <p>
   You should now be ready to work with database objects and data
        using NDB Cluster 's
   <a class="link" href="mysql-cluster.html" title="Chapter 25 MySQL NDB Cluster 8.4">
    <code class="literal">
     NDBCLUSTER
    </code>
   </a>
   storage engine. See
   <a class="xref" href="mysql-cluster-install-example-data.html" title="25.3.5 NDB Cluster Example with Tables and Data">
    Section 25.3.5, “NDB Cluster Example with Tables and Data”
   </a>
   , for more
        information and examples.
  </p>
  <p>
   You can also install
   <a class="link" href="mysql-cluster-programs-ndb-mgmd.html" title="25.5.4 ndb_mgmd — The NDB Cluster Management Server Daemon">
    <span class="command">
     <strong>
      ndb_mgmd.exe
     </strong>
    </span>
   </a>
   ,
   <a class="link" href="mysql-cluster-programs-ndbd.html" title="25.5.1 ndbd — The NDB Cluster Data Node Daemon">
    <span class="command">
     <strong>
      ndbd.exe
     </strong>
    </span>
   </a>
   , and
   <a class="link" href="mysql-cluster-programs-ndbmtd.html" title="25.5.3 ndbmtd — The NDB Cluster Data Node Daemon (Multi-Threaded)">
    <span class="command">
     <strong>
      ndbmtd.exe
     </strong>
    </span>
   </a>
   as Windows services. For information on how to do this, see
   <a class="xref" href="mysql-cluster-install-windows-service.html" title="25.3.2.4 Installing NDB Cluster Processes as Windows Services">
    Section 25.3.2.4, “Installing NDB Cluster Processes as Windows Services”
   </a>
   ).
  </p>
 </div>
 <br/>
</div>
