MySQL 7 (cluster) cluster configuration

Source: Internet
Author: User
Tags node server

Note: After the data node is started, 2 GB of Hard Disk Space (preallocate the space for the logs (used for recovery) will be pre-allocated ). this is to avoid problems during running of waiting for the OS to allocate disk space or running out of space), and then start the service node after the allocation is successful!

 

Procedure: http://www.cnblogs.com/jinzhenshui/archive/2009/12/18/1627364.html

#

Manage the node configuration file my_cluster.ini:

[Ndbd default]
Noofreplicas = 2 # The default value is 2.
Datadir = E: \ Program Files \ mysql server 7.0 \ data \ user_data # create

# Managment Server
[Ndb_mgmd]
Nodeid = 40
Hostname = 192.168.1.102 # manage the IP address of node server db1
# Storage engines
[Ndbd]
Nodeid = 11
Hostname = 192.168.1.102 # IP address of MySQL cluster db1
[Ndbd]
Nodeid = 12
Hostname = 192.168.1.102 # IP address of MySQL cluster DB2
[Mysqld]
Nodeid = 1
Hostname = 192.168.1.102
[Mysqld]
Nodeid = 2
Hostname = 192.168.1.102
[Mysqld]
Nodeid = 3
Hostname = 192.168.1.102

------------------------------------------

Each MySQL configuration file (specified port and datadir ):
[Mysqld]
Basedir = "E:/program files/MySQL Server 7.0"
Default-character-set = utf8
Default-storage-engine = ndbcluster
SQL-mode = "strict_trans_tables, no_auto_create_user, no_engine_substitution"
Port = 33061
Datadir = "E:/program files/MySQL Server 7.0/data/user_data/node1 /"
General_log_file = "E:/program files/MySQL Server 7.0/data/user_data/node1/general_log.log"
#
Ndbcluster
Ndb_connectstring = "192.168.1.102"
#
Skip_innodb
#
[Ndbd]
Ndb_connectstring = "192.168.1.102"

------------------------------------------

Copy the MySQL database to datadir.

 

 

Run:

Management node (mgmd) BAT:

"E: \ Program Files \ mysql server 7.0 \ bin \ ndb_mgmd.exe" -- config-file = "E: /program files/MySQL Server 7.0/data/mysql_cfg/my_cluster.ini "-- Initial
Pause

Data Node (ndbd ):

"E: \ Program Files \ mysql server 7.0 \ bin \ ndbd.exe" -- defaults-file = "E: \ Program Files \ mysql server 7.0 \ data \ user_data \ node1 \ my_node1.ini"

(Ndb_mgm.exe) show:

Service Node (mysqld ):

"E: \ Program Files \ mysql server 7.0 \ bin \ mysqld.exe" -- defaults-file = "E: \ Program Files \ mysql server 7.0 \ data \ user_data \ node1 \ my_node1.ini "-- Console
Pause

Show:

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.