[Original] How to initialize and start a MySQL cluster in Windows

Source: Internet
Author: User
Tags node server
ArticleDirectory
    • 1.1.1.1 initialization startup
1.1.1 cluster startup 1.1.1.1 initialization startup

When the cluster is started for the first time, the start method is different from that after the cluster is started. Pay special attention to the following:

1) first, start the cluster management node: log on to the server where the MySQL cluster management node is located, open the CMD command window, switch the directory to c: \ mysql-cluster \ bin, and run the command ndb_mgmd.exe -- Initial;

 

2) Start the cluster data node: log on to the server where the MySQL cluster data node is located, open the CMD command window, switch the directory to C: \ mysql-cluster \ bin, execute the command ndbd.exe-initial (only the initial initialization parameter needs to be added when the first Initialization is started), each node server needs to do this twice, because on each server, you need to start two data nodes. server a starts nodes 1 and 3, and server B starts nodes 2 and 4. For example:

Cluster data node server a startup Interface]

 

[Cluster data node server B startup interface]

3) then, we start the query node: log on to the server where the MySQL cluster query node is located, open the CMD command window, switch the directory to c: \ mysql-cluster \ bin, and execute the command mysqld.exe-console, there are several servers that need to connect to the data node. You need to start several query nodes. In our configuration, we need to start 192.168.0.1 and 192.168.0.3 by default.

 

Data Query node server startup Interface]

4) Finally, run the ndb_mgm command on a data node server to check whether the cluster is successfully started: log on to the ndb_mgm client and open the CMD command window on the data node or management node server, switch the directory to c: \ mysql-cluster \ bin, execute ndb_mgm.exe, enter the show command, and query the MySQL cluster status:

 

[Ndb_mgm console startup interface]

If the show command shows the result, the cluster is successfully started. To exit the ndb_mgm client, enter the quit command.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.