日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql cluster自动安装_MySQL Cluster 安装

發布時間:2025/3/21 数据库 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql cluster自动安装_MySQL Cluster 安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

下載軟件包:

[root@mysql1 paul]# wget http://cdn.mysql.com/Downloads/MySQL-Cluster-7.2/mysql-cluster-gpl-7.2.10.tar.gz

配置前的規劃

管理節點IP: 172.1.2.10 節點ID: id=1 Management Node

NDB數據節點1: 172.1.2.9 節點ID: id=2 Data Node

NDB數據節點2: 172.1.2.8 節點ID: id=3 Data Node

mysql節點2: 172.1.2.7 節點ID: id=4 SQL Node

所有機器關閉防火墻:

[root@mysql1 mysql-cluster-gpl-7.2.10]# /etc/init.d/iptables stop

Flushing firewall rules: [ OK ]

Setting chains to policy ACCEPT: mangle filter [ OK ]

Unloading iptables modules: [ OK ]

You have new mail in /var/spool/mail/root

[root@mysql1 mysql-cluster-gpl-7.2.10]#

系統版本:

[root@mysql1 paul]# uname -a

Linux mysql1.qyer.com 2.6.18-308.el5.028stab099.3 #1 SMP Wed Mar 7 15:56:00 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux

You have new mail in /var/spool/mail/root

[root@mysql1 paul]#

安裝管理節點與其它節點安裝是一樣的

[root@mysql1 paul]# tar -zxvf mysql-cluster-gpl-7.2.10.tar.gz

[root@mysql1 paul]# cd mysql-cluster-gpl-7.2.10

[root@mysql1 mysql-cluster-gpl-7.2.10]# cmake -DCMAKE_INSTALL_PREFIX=/Data/apps/mysql-5.5.12 -DWITH_INNOBASE_STORAGE_ENGINE=ON -DWITH_MYISAM_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

出錯:

CMake Error at storage/ndb/cmake/ndb_require_variable.cmake:24 (MESSAGE):

The variable JAVA_RUNTIME is required to build NDB

Call Stack (most recent call first):

storage/ndb/CMakeLists.txt:247 (NDB_REQUIRE_VARIABLE)

解決:

[root@mysql1 mysql-cluster-gpl-7.2.10]# yum install java

[root@mysql1 mysql-cluster-gpl-7.2.10]# rm CMakeCache.txt

[root@mysql1 mysql-cluster-gpl-7.2.10]# java -version

java version "1.6.0_24"

OpenJDK Runtime Environment (IcedTea6 1.11.8) (rhel-1.35.1.11.8.el5_9-x86_64)

OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

[root@mysql1 mysql-cluster-gpl-7.2.10]#

又一個錯:

– Looking for MySQL include file my_default.h – not found

– Java_VERSION:

– Java_VERSION_STRING:

– JAVA_RUNTIME: /usr/bin/java

– JAVA_COMPILE: JAVA_COMPILE-NOTFOUND

– JAVA_ARCHIVE: JAVA_ARCHIVE-NOTFOUND

CMake Error at storage/ndb/cmake/ndb_require_variable.cmake:24 (MESSAGE):

The variable JAVA_COMPILE is required to build NDB

Call Stack (most recent call first):

storage/ndb/CMakeLists.txt:248 (NDB_REQUIRE_VARIABLE)

嘗試解決:

下載一個jre:http://java.com/zh_CN/download/manual.jsp

出錯:[root@mysql1 paul]# rpm -ivh jre-7u15-linux-i586.rpm

Preparing… ########################################### [100%]

1:jre ########################################### [100%]

Unpacking JAR files…

rt.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/rt.pack

jsse.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/jsse.pack

charsets.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/charsets.pack

localedata.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/ext/localedata.pack

plugin.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/plugin.pack

javaws.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/javaws.pack

deploy.jar…

Error: Could not open input file: /usr/java/jre1.7.0_15/lib/deploy.pack

[root@mysql1 paul]#

嘗試下載JDK

[root@mysql1 paul]# chmod +x jdk-6u13-linux-i586.bin

[root@mysql1 paul]# ./jdk-6u13-linux-i586.bin

[root@mysql1 paul]# mv jdk1.6.0_13 /usr/local/

[root@mysql1 paul]# cd /etc/profile.d/

[root@mysql1 profile.d]# vim java.sh

#set java environment

JAVA_HOME=/usr/local/jdk1.6.0_13

CLASSPATH=.:$JAVA_HOME/lib/tools.jar

PATH=$JAVA_HOME/bin:$PATH

export JAVA_HOME CLASSPATH PATH

[root@mysql1 profile.d]# source java.sh

[root@mysql1 profile.d]# java -version

java version "1.6.0_13"

Java(TM) SE Runtime Environment (build 1.6.0_13-b03)

Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)

[root@mysql1 profile.d]#

成功:

– Using gcc atomic builtins

– Looking for mach/mach_time.h

– Looking for mach/mach_time.h – not found

– Looking for srandomdev

– Looking for srandomdev – not found

– Looking for gethrvtime

– Looking for gethrvtime – not found

– Looking for memset

– Looking for memset – found

– Performing Test HAVE_FUNC_IN_CXX

– Performing Test HAVE_FUNC_IN_CXX – Success

– Performing Test HAVE_PEERCRED

– Performing Test HAVE_PEERCRED – Success

– Configuring done

– Generating done

– Build files have been written to: /home/paul/mysql-cluster-gpl-7.2.10

[root@mysql1 mysql-cluster-gpl-7.2.10]#

[root@mysql1 mysql-cluster-gpl-7.2.10]# make

[root@mysql1 mysql-cluster-gpl-7.2.10]# make install

———————————————————————————————————————–

NDB數據節點安裝:

NDB數據節點1: 172.1.2.9 節點ID: id=2 Data Node

NDB數據節點2: 172.1.2.8 節點ID: id=3 Data Node

安裝步驟和管理節點一樣,也需要JAVA環境,

[root@mysql3 mysql-cluster-gpl-7.2.10]# yum install cmake gcc bison gcc-c++ ncurses-devel

[root@mysql02 mysql-cluster-gpl-7.2.10]# cmake -DCMAKE_INSTALL_PREFIX=/Data/apps/mysql-5.5.12 -DWITH_INNOBASE_STORAGE_ENGINE=ON -DWITH_MYISAM_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

———————————————————————————————————————–

SQL Node的安裝:

[root@mysql4 mysql-cluster-gpl-7.2.10]# yum install cmake gcc bison gcc-c++ ncurses-devel

[root@mysql4 mysql-cluster-gpl-7.2.10]# cmake -DCMAKE_INSTALL_PREFIX=/Data/apps/mysql-5.5.12 -DWITH_INNOBASE_STORAGE_ENGINE=ON -DWITH_MYISAM_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

———————————————————————————————————————–

配置管理節點:

安裝位于:

[root@mysql1 mysql-5.5.12]# pwd

/Data/apps/mysql-5.5.12

[root@mysql1 mysql-5.5.12]# ll

total 76

drwxr-xr-x 2 root root 4096 Feb 26 08:51 bin

-rw-r–r– 1 root root 17987 Dec 20 00:12 COPYING

drwxr-xr-x 4 root root 4096 Feb 26 08:51 data

drwxr-xr-x 2 root root 4096 Feb 26 08:51 docs

drwxr-xr-x 4 root root 4096 Feb 26 08:51 include

-rw-r–r– 1 root root 7605 Dec 20 00:12 INSTALL-BINARY

drwxr-xr-x 3 root root 4096 Feb 26 08:51 lib

drwxr-xr-x 4 root root 4096 Feb 26 08:51 man

drwxr-xr-x 10 root root 4096 Feb 26 08:51 mysql-test

-rw-r–r– 1 root root 2552 Dec 20 00:12 README

drwxr-xr-x 2 root root 4096 Feb 26 08:51 scripts

drwxr-xr-x 29 root root 4096 Feb 26 08:51 share

drwxr-xr-x 4 root root 4096 Feb 26 08:51 sql-bench

drwxr-xr-x 2 root root 4096 Feb 26 08:52 support-files

[root@mysql1 mysql-5.5.12]#

建立配置文件:

[root@mysql1 mysql-5.5.12]# mkdir cluster-conf

[root@mysql1 mysql-5.5.12]# cp /Data/apps/mysql-5.5.12/support-files/ndb-config-2-node.ini /Data/apps/mysql-5.5.12/cluster-conf/

You have new mail in /var/spool/mail/root

[root@mysql1 mysql-5.5.12]#

設置權限:

[root@mysql1 /]# chown mysql:mysql /Data/apps/mysql-5.5.12 –R

進入配置文件目錄:

[root@mysql1 mysql-5.5.12]# cd /Data/apps/mysql-5.5.12/cluster-conf/

打開配置文件:

[root@mysql1 cluster-conf]# cat ndb-config-2-node.ini

# Copyright (c) 2006, 2010,Oracleand/or its affiliates. All rights reserved.

#

# This program is free software; you can redistribute it and/or modify

# it under the terms of the GNU General Public License as published by

# the Free Software Foundation; version 2 of the License.

#

# This program is distributed in the hope that it will be useful,

# but WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

# GNU General Public License for more details.

#

# You should have received a copy of the GNU General Public License

# along with this program; if not, write to the Free Software

# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

#

# Example Ndbcluster storage engine config file.

#

[ndbd default]

NoOfReplicas= 2

MaxNoOfConcurrentOperations= 10000

DataMemory= 80M

IndexMemory= 24M

TimeBetweenWatchDogCheck= 30000

[ndb_mgmd]

Id=1

HostName= 172.1.2.10

Datadir=/Data/apps/mysql-5.5.12/data

[ndbd]

Id= 2

HostName= 172.1.2.9

Datadir=/Data/apps/mysql-5.5.12/ndbdata

[ndbd]

Id= 3

HostName= 172.1.2.8

Datadir=/Data/apps/mysql-5.5.12/ndbdata

[mysqld]

Id= 4

HostName= 172.1.2.7

# choose an unused port number

# in this configuration 63132, 63133, and 63134

# will be used

[tcp default]

PortNumber= 63132

[root@mysql1 cluster-conf]#

同步進行數據節點進行相應配置

[root@mysql2 mysql-5.5.12]# mkdir -p /Data/apps/mysql-5.5.12/ndbdata

[root@mysql3 mysql-cluster-gpl-7.2.10]# mkdir -p /Data/apps/mysql-5.5.12/ndbdata

[root@mysql2 home]# chown mysql:mysql /Data/apps/mysql-5.5.12/ -R

[root@mysql3 mysql-cluster-gpl-7.2.10]# chown mysql:mysql /Data/apps/mysql-5.5.12/ –R

配置數據節點:

NDB數據節點1: 172.1.2.9 節點ID: id=2 Data Node

NDB數據節點2: 172.1.2.8 節點ID: id=3 Data Node

[root@mysql2 support-files]# cp /Data/apps/mysql-5.5.12/support-files/my-medium.cnf /etc/my.cnf

cp錛..????..etc/my.cnf?. y

[root@mysql2 support-files]#

[root@mysql2 ndbdata]# cat /etc/my.cnf

# Example MySQL config file for medium systems.

#

# This is for a system with little memory (32M – 64M) where MySQL plays

# an important part, or systems up to 128M where MySQL is used together with

# other programs (such as a web server)

#

# MySQL programs look for option files in a set of

# locations which depend on the deployment platform.

# You can copy this option file to one of those

# locations. For information about these locations, see:

# http://dev.mysql.com/doc/mysql/en/option-files.html

#

# In this file, you can use all long options that a program supports.

# If you want to know which options a program supports, run the program

# with the "–help" option.

# The following options will be passed to all MySQL clients

# Here follows entries for some specific programs

# The MySQL server

[mysqld]

Datadir=/Data/apps/mysql-5.5.12/ndbdata

ndbcluster

ndb-connectstring=172.1.2.10

[mysql_cluster]

ndb-connectstring=172.1.2.10

You have new mail in /var/spool/mail/root

[root@mysql2 ndbdata]#

[root@mysql3 apps]# cp /Data/apps/mysql-5.5.12/support-files/my-medium.cnf /etc/my.cnf

cp錛..????..etc/my.cnf?. y

[root@mysql3 apps]#

———————————————————————————————————————–

[root@mysql3 apps]# cat /etc/my.cnf

# Example MySQL config file for medium systems.

#

# This is for a system with little memory (32M – 64M) where MySQL plays

# an important part, or systems up to 128M where MySQL is used together with

# other programs (such as a web server)

#

# MySQL programs look for option files in a set of

# locations which depend on the deployment platform.

# You can copy this option file to one of those

# locations. For information about these locations, see:

# http://dev.mysql.com/doc/mysql/en/option-files.html

#

# In this file, you can use all long options that a program supports.

# If you want to know which options a program supports, run the program

# with the "–help" option.

# The following options will be passed to all MySQL clients

# The MySQL server

[mysqld]

Datadir=/Data/apps/mysql-5.5.12/ndbdata

ndbcluster

ndb-connectstring=172.1.2.10

[mysql_cluster]

ndb-connectstring=172.1.2.10

[root@mysql3 apps]#

———————————————————————————————————————–

數據節點:

[root@mysql4 mysql-5.5.12]# cp /Data/apps/mysql-5.5.12/support-files/my-medium.cnf /etc/my.cnf

cp錛..????..etc/my.cnf?. y

[root@mysql4 mysql-5.5.12]#

初始化數據庫:

[root@mysql4 mysql-5.5.12]# /Data/apps/mysql-5.5.12/scripts/mysql_install_db –user=mysql –basedir=/Data/apps/mysql-5.5.12/ –datadir=/Data/apps/mysql-5.5.12/data/

Installing MySQL system tables…

ERROR: 1 Can’t create/write to file ‘/tmp/#sql_6dcc_0.MYI’ (Errcode: 13)

130226 10:32:07 [ERROR] Aborting

130226 10:32:07 [Note] /Data/apps/mysql-5.5.12//bin/mysqld: Shutdown complete

解決:

[root@mysql4 /]# chmod 777 /tmp/ –R

[root@mysql4 /]# /Data/apps/mysql-5.5.12/scripts/mysql_install_db –user=mysql –basedir=/Data/apps/mysql-5.5.12/ –datadir=/Data/apps/mysql-5.5.12/data/

Installing MySQL system tables…

OK

Filling help tables…

OK

To start mysqld at boot time you have to copy

啟動管理節點:

[root@mysql1 mysql-5.5.12]# /Data/apps/mysql-5.5.12/bin/ndb_mgmd -f /Data/apps/mysql-5.5.12/cluster-conf/ndb-config-2-node.ini

MySQL Cluster Management Server mysql-5.5.29 ndb-7.2.10

2013-02-26 10:36:57 [MgmtSrvr] INFO — The default config directory ‘/Data/apps/mysql-5.5.12/mysql-cluster’ does not exist. Trying to create it…

2013-02-26 10:36:57 [MgmtSrvr] INFO — Sucessfully created config directory

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 27: [MGM] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 32: [DB] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 37: [DB] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 41: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 45: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 48: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 51: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 57: [tcp] PortNumber is deprecated

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 27: [MGM] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 32: [DB] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 37: [DB] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 41: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 45: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 48: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 51: [API] Id is deprecated, use NodeId instead

2013-02-26 10:36:57 [MgmtSrvr] WARNING — at line 57: [tcp] PortNumber is deprecated

在次啟動就行了:

都顯示not connected

[root@mysql1 mysql-cluster]# /Data/apps/mysql-5.5.12/bin/ndb_mgmd -f /Data/apps/mysql-5.5.12/cluster-conf/ndb-config-2-node.ini

MySQL Cluster Management Server mysql-5.5.29 ndb-7.2.10

[root@mysql1 mysql-cluster]# /Data/apps/mysql-5.5.12/bin/ndb_mgm

– NDB Cluster — Management Client —

ndb_mgm> show

Connected to Management Server at: localhost:1186

Cluster Configuration

———————

[ndbd(NDB)] 2 node(s)

id=2 (not connected, accepting connect from 172.1.2.9)

id=3 (not connected, accepting connect from 172.1.2.8)

[ndb_mgmd(MGM)] 1 node(s)

id=1 @172.1.2.10 (mysql-5.5.29 ndb-7.2.10)

[mysqld(API)] 4 node(s)

id=4 (not connected, accepting connect from 172.1.2.7)

i

d=5 (not connected, accepting connect from any host)

id=6 (not connected, accepting connect from any host)

id=7 (not connected, accepting connect from any host)

ndb_mgm>

啟動數據節點:

NDB數據節點1: 172.1.2.9 節點ID: id=2 Data Node

NDB數據節點2: 172.1.2.8 節點ID: id=3 Data Node

[root@mysql2 ndbdata]# /Data/apps/mysql-5.5.12/bin/ndbd

2013-02-26 10:43:41 [ndbd] INFO — Angel connected to ’172.1.2.10:1186′

2013-02-26 10:43:41 [ndbd] INFO — Angel allocated nodeid: 2

[root@mysql2 ndbdata]#

[root@mysql3 apps]# /Data/apps/mysql-5.5.12/bin/ndbd

2013-02-26 10:44:57 [ndbd] INFO — Angel connected to ’172.1.2.10:1186′

2013-02-26 10:44:57 [ndbd] INFO — Angel allocated nodeid: 3

[root@mysql3 apps]#

啟動SQL節點:

[root@mysql4 /]# /Data/apps/mysql-5.5.12/bin/mysqld_safe &

[1] 28179

[root@mysql4 /]# 130226 10:45:53 mysqld_safe Logging to ‘/Data/apps/mysql-5.5.12/data/mysql4.qyer.com.err’.

130226 10:45:53 mysqld_safe Starting mysqld daemon with databases from /Data/apps/mysql-5.5.12/data

[root@mysql4 /]# ps -ef |grep mysql

root 28179 3274 0 10:45 pts/0 00:00:00 /bin/sh /Data/apps/mysql-5.5.12/bin/mysqld_safe

mysql 28271 28179 2 10:45 pts/0 00:00:00 /Data/apps/mysql-5.5.12/bin/mysqld –basedir=/Data/apps/mysql-5.5.12 –datadir=/Data/apps/mysql-5.5.12/data –plugin-dir=/Data/apps/mysql-5.5.12/lib/plugin –user=mysql –log-error=/Data/apps/mysql-5.5.12/data/mysql4.qyer.com.err –pid-file=/Data/apps/mysql-5.5.12/data/mysql4.qyer.com.pid

root 28284 3274 0 10:46 pts/0 00:00:00 grep mysql

[root@mysql4 /]#

[root@mysql4 support-files]# cat /etc/my.cnf

# Example MySQL config file for medium systems.

#

# This is for a system with little memory (32M – 64M) where MySQL plays

# an important part, or systems up to 128M where MySQL is used together with

# other programs (such as a web server)

#

# MySQL programs look for option files in a set of

# locations which depend on the deployment platform.

# You can copy this option file to one of those

# locations. For information about these locations, see:

# http://dev.mysql.com/doc/mysql/en/option-files.html

#

# In this file, you can use all long options that a program supports.

# If you want to know which options a program supports, run the program

# with the "–help" option.

# The following options will be passed to all MySQL clients

[client]

#password = your_password

port = 3306

socket = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server

[mysqld]

ndbcluster

ndb-connectstring=172.1.2.10

[mysql_cluster]

ndb-connectstring=172.1.2.10

port = 3306

socket = /tmp/mysql.sock

skip-external-locking

skip-grant-tables

key_buffer_size = 16M

max_allowed_packet = 1M

table_open_cache = 64

sort_buffer_size = 512K

net_buffer_length = 8K

read_buffer_size = 256K

read_rnd_buffer_size = 512K

myisam_sort_buffer_size = 8M

# Don’t listen on a TCP/IP port at all. This can be a security enhancement,

# if all processes that need to connect to mysqld run on the same host.

# All interaction with mysqld must be made via Unix sockets or named pipes.

# Note that using this option without enabling named pipes on Windows

# (via the "enable-named-pipe" option) will render mysqld useless!

#

#skip-networking

# Replication Master Server (default)

# binary logging is required for replication

log-bin=mysql-bin

# binary logging format – mixed recommended

binlog_format=mixed

# required unique id between 1 and 2^32 – 1

# defaults to 1 if master-host is not set

# but will not function as a master if omitted

server-id = 1

# Replication Slave (comment out master section to use this)

#

# To configure this host as a replication slave, you can choose between

# two methods :

#

# 1) Use the CHANGE MASTER TO command (fully described in our manual) –

# the syntax is:

#

# CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=,

# MASTER_USER=, MASTER_PASSWORD= ;

#

# where you replace , , by quoted strings and

# by the master’s port number (3306 by default).

#

# Example:

#

# CHANGE MASTER TO MASTER_HOST=’125.564.12.1′, MASTER_PORT=3306,

# MASTER_USER=’joe’, MASTER_PASSWORD=’secret’;

#

# OR

#

# 2) Set the variables below. However, in case you choose this method, then

# start replication for the first time (even unsuccessfully, for example

# if you mistyped the password in master-password and the slave fails to

# connect), the slave will create a master.info file, and any later

# change in this file to the variables’ values below will be ignored and

# overridden by the content of the master.info file, unless you shutdown

# the slave server, delete master.info and restart the slaver server.

# For that reason, you may want to leave the lines below untouched

# (commented) and instead use CHANGE MASTER TO (see above)

#

# required unique id between 2 and 2^32 – 1

# (and different from the master)

# defaults to 2 if master-host is set

# but will not function as a slave if omitted

#server-id = 2

#

# The replication master for this slave – required

#master-host =

#

# The username the slave will use for authentication when connecting

# to the master – required

#master-user =

#

# The password the slave will authenticate with when connecting to

# the master – required

#master-password =

#

# The port the master is listening on.

# optional – defaults to 3306

#master-port =

#

# binary logging – not required for slaves, but recommended

#log-bin=mysql-bin

# Uncomment the following if you are using InnoDB tables

#innodb_data_home_dir = /Data/apps/mysql-5.5.12/data

#innodb_data_file_path = ibdata1:10M:autoextend

#innodb_log_group_home_dir = /Data/apps/mysql-5.5.12/data

# You can set .._buffer_pool_size up to 50 – 80 %

# of RAM but beware of setting memory usage too high

#innodb_buffer_pool_size = 16M

#innodb_additional_mem_pool_size = 2M

# Set .._log_file_size to 25 % of buffer pool size

#innodb_log_file_size = 5M

#innodb_log_buffer_size = 8M

#innodb_flush_log_at_trx_commit = 1

#innodb_lock_wait_timeout = 50

[mysqldump]

quick

max_allowed_packet = 16M

[mysql]

no-auto-rehash

# Remove the next comment character if you are not familiar with SQL

#safe-updates

[myisamchk]

key_buffer_size = 20M

sort_buffer_size = 20M

read_buffer = 2M

write_buffer = 2M

[mysqlhotcopy]

interactive-timeout

[root@mysql4 support-files]#

———————————————————————————————————————-

在次查看管理節點:

ndb_mgm> show

Cluster Configuration

———————

[ndbd(NDB)] 2 node(s)

id=2 @172.1.2.9 (mysql-5.5.29 ndb-7.2.10, Nodegroup: 0, Master)

id=3 @172.1.2.8 (mysql-5.5.29 ndb-7.2.10, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)

id=1 @172.1.2.10 (mysql-5.5.29 ndb-7.2.10)

[mysqld(API)] 4 node(s)

id=4 @172.1.2.7 (mysql-5.5.29 ndb-7.2.10)

id=5 (not connected, accepting connect from any host)

id=6 (not connected, accepting connect from any host)

id=7 (not connected, accepting connect from any host)

ndb_mgm>

MySQL Cluster 的詳細介紹

:請點這里

MySQL Cluster 的下載地址

:請點這里

總結

以上是生活随笔為你收集整理的mysql cluster自动安装_MySQL Cluster 安装的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。