Install and configure mysqlcluster7.3.2 _ MySQL in Windows XP Virtual Machine

Source: Internet
Author: User
Tags node server
Install and configure mysqlcluster7.3.2 bitsCN.com in Windows XP

Install and configure mysql cluster 7.3.2 in windows xp Virtual Machine

1. installed in a virtual machine environment

1 192.168.131.21 (management node, storage node, SQL node)

2 192.168.131.22 (storage node, SQL node)

2. installer

On both machines at the same time

Step 1:

Download and install software address: http://dev.mysql.com/downloads/cluster/

My version is MySQL Cluster 5.6.11 (mysql cluster 7.3.2 after MSI is installed, mysql cluster 5.6.11)

Step 2:

Install the MSI software. mysql instance is not created during installation.

I installed it in c:/mysql cluster 7.3

Step 3:

C to the binfolder of your installation directory, execute mysqld.exe -- install mysql/* after setting environment variables still need to execute this command, otherwise it will be installed in c:/program files/mysql/mysql-5.6.10, so that it cannot run)

Step 4:

Set environment variables

3. create a configuration file

Step 1:

Create the config. ini file

In the c:/cluster/config. ini file

Content:

[Ndbd default]

NoOfReplicas = 2

# Managment Server

[NDB_MGMD]

Hostname = 192.168.131.21

Nodeid = 1

Datadir = C:/MySQL Cluster 7.3/data

# Data nodes

[NDBD]

NodeId = 5

Hostname = 192.168.131.21

Datadir = d:/data

[NDBD]

NodeId = 6

Hostname = 192.168.131.22

Datadir = d:/data

# SQL node

[MYSQLD]

ArbitrationRank = 2

Hostname = 192.168.131.21

NodeId = 7

[MYSQLD]

ArbitrationRank = 2

Hostname = 192.168.131.22

NodeId = 8

[MYSQLD]

[MYSQLD]

Step 2:

Create mysql configuration file my. ini

Find a my-**. ini file in the installation path.

Copy to the current directory and rename it my. ini

Add the start of [mysqld] in the file

# Path to installation directory. All paths are usually resolved relative to this.

Basedir = "C:/MySQL Cluster 7.3"

Datadir = "C:/MySQL Cluster 7.3/data"

Add at the end of [mysqld]

Ndbcluster

Ndb-connectstring = 192.168.131.21

Add at the end of the my. ini file

[Mysql_cluster]

Ndb-connectstring = 192.168.131.21 # both VMS have the same settings.

Save files

4. start mysql cluster (the following operations are performed in CMD)

1. on the management node server (192.168.131.21 in this article)

Ndb_mgmd.exe -- config-file = c:/cluster/config-ini -- configdir = c:/cluster

New CMD window

Ndbd.exe -- initial/* Add the -- initial parameter to the first startup node */

New CMD window

Mysqld.exe -- default-file = "C:/MySQL Cluster 7.3/my. ini"

Start mysql after execution

Net start mysql

Second, run at 192.168.131.22.

Ndbd.exe

New CMD window

Mysqld.exe -- default-file = "C:/MySQL Cluster 7.3/my. ini"

Start mysql after execution

Net start mysql

5. view the installation status

Open the CMD window on the 192.168.131.21 server

Ndb_mgm.exe

Ndb_mgm> show

Connection to Management Server at: 192.168.2.57: 1186

Cluster Configuration

-------

[Ndbd (NDB)] 2 node (s)

Id = 5 @ 192.168.131.21 (mysql-5.6.10 ndb-7.3.2, node group: 0, Master)

Id = 6 @ 192.168.2.56 (mysql-5.6.10 ndb-7.3.2, node group: 0)

[Ndb_mgmd (MGM)] 1 node (s)

Id = 1 @ 192.168.131.21 (mysql-5.6.10 ndb-7.3.2)

[Mysqld (API)] 2 node (s)

Id = 7 @ 192.168.131.21 (mysql-5.6.10 ndb-7.3.2)

Id = 8 @ 192.168.131.22 (mysql-5.6.10ndb-7.3.2)

If the preceding information is displayed, the installation is successful.

Then log on to mysql on a server

Mysql-uroot

Show engines;

Check whether ndbcluster is successfully installed.

Create databases and tables

Create database test;

Create table tt (id int (10) engine = ndbcluster;

Insert into tt (1 );

Then go to another server to view

Check whether the database is synchronized

BitsCN.com

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.