来自 美高梅4858mgm 2019-11-09 14:49 的文章
当前位置: 美高梅4858官方网站 > 美高梅4858mgm > 正文

15安装部署性能测试,centos65安装简测mysqlcluster7

and boolean options {FALSE|TRUE} Value (after reading options)


ndb-connectstring 192.168.55.15
ndb-mgmd-host 192.168.55.15
ndb-nodeid 0
ndb-optimized-node-selection TRUE
connect-string 192.168.55.15
core-file FALSE
character-sets-dir (No default value)
config-file (No default value)
print-full-config FALSE
daemon TRUE
interactive FALSE
no-nodeid-checks FALSE
nodaemon FALSE
mycnf FALSE
bind-address (No default value)
configdir /usr/local/mysql/mysql-cluster
config-dir /usr/local/mysql/mysql-cluster
config-cache TRUE
verbose FALSE
reload FALSE
initial FALSE
log-name MgmtSrvr
nowait-nodes (No default value)
[[email protected] bin]#
[[email protected] bin]# ndb_mgmd -e shutdown
MySQL Cluster Management Server mysql-5.6.21 ndb-7.3.7
ndb_mgmd: unknown option '-e'
[[email protected] bin]#
[[email protected] bin]#
[[email protected] bin]# ndb_mgm --help
Usage: ndb_mgm [OPTIONS] [hostname [port]]
MySQL distrib mysql-5.6.21 ndb-7.3.7, for linux-glibc2.5 (x86_64)

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
The following groups are read: mysql_cluster ndb_mgm
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file,
except for login file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
Also read groups with concat(group, suffix)
--login-path=# Read this path from the login file.

-?, --usage Display this help and exit.
-?, --help Display this help and exit.
-V, --version Output version information and exit.
-c, --ndb-connectstring=name
Set connect string for connecting to ndb_mgmd. Syntax:
"[nodeid=<id>;][host=]<hostname>[:<port>]". Overrides
specifying entries in NDB_CONNECTSTRING and my.cnf
--ndb-mgmd-host=name
same as --ndb-connectstring
--ndb-nodeid=# Set node id for this node. Overrides node id specified in
--ndb-connectstring.
--ndb-optimized-node-selection
Select nodes for transactions in a more optimal way
(Defaults to on; use --skip-ndb-optimized-node-selection to disable.)
-c, --connect-string=name
same as --ndb-connectstring
--core-file Write core on errors.
--character-sets-dir=name
Directory where character sets are.
-e, --execute=name execute command and exit
-t, --try-reconnect=#
Specify number of tries for connecting to ndb_mgmd (0 =
infinite)
-v, --verbose=# Control the amount of printout

Variables (--variable-name=value)

3.2 set the path of file run
[[email protected] mysql-cluster-gpl-7.2.15-linux2.6-x86_64]# vi ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin

centos65设置简测mysqlcluster7.3.7

MySQLCluster 是sharednothing分布式架构,ndb存款和储蓄引擎把数据放置于内部存款和储蓄器中。能够成功无单点故障。由运转于分歧服务器上的的有余经过构成,组件满含SQL节点,NDBD数据节点,管理程序,以至(可能的卡塔 尔(英语:State of Qatar)数据访谈程序。

表(结构卡塔 尔(阿拉伯语:قطر‎存在SQL节点中。应用程序通过SQL节点访问那些数据表;NDBD数据节点用于保存数据;集群管理通过管理工具ndb_mgmd管理。
MySQLCluster具备高可用性、高品质和可缩放性的Cluster数据管理。关于 Cluster中组件的关联可以知道下图:

美高梅4858mgm 1

mysql集群

安装
< 喎?" target="_blank" class="keylink">vcD4Ku7e+s6O6PGJyPgpbcm9vdEBteXFDbHRlcjEgfl0jIHVuYW1lIC1hPGJyPgpMaW51eCBteXFDbHRlcjEgMi42LjMyLTUwNC4zLjMuZWw2Lng4Nl82NCAjMSBTTVAgV2VkIERlYyAxNyAwMTo1NTowMiBVVEMgMjAxNCB4ODZfNjQgeDg2XzY0IHg4Nl82NCBHTlUvTGludXg8YnI+Cltyb290QG15cUNsdGVyMSB+XSMgY2F0IC9ldGMvaXNzdWU8YnI+CkNlbnRPUyByZWxlYXNlIDYuNSAoRmluYWwpPGJyPgpLZXJuZWwgXHIgb24gYW4gXG08YnI+Cjxicj4KMTxicj4Kz8LU2Dxicj4KbXlzcWwtY2x1c3Rlci1ncGwtNy4zLjc8YnI+Cmh0dHA6Ly9kZXYubXlzcWwuY29tL2Rvd25sb2Fkczxicj4KPGJyPgoyPGJyPgq55ruuPGJyPgpteXNxbCBjbHVzdGVyIDW49r3ateOjrNew1NrBvcyou/rG98nPPGJyPgoxOTIuMTY4LjU1LjE1INf20ru49sr9vt292rXjo6xTUUy92rXjo6y53MDtvdq14zxicj4KMTkyLjE2OC41NS4xNiDX9tK7uPbK/b7dvdq146OsU1FMvdq146OsudzA7b3ateM8YnI+Cjxicj4KMzxicj4Ksum/tNLR17Cw/Dxicj4KW3Jvb3RAbXlxQ2x0ZXIxIH5dIyAgcnBtIC1xYQ=="grep mysql
mysql-libs-5.1.71-1.el6.x86_64
[[email protected] ~]#

4
删除
[[email protected] ~]# yum -y remove mysql-libs-5.1.71-1.el6.x86_64

###################
#配备数据节点和sql节点
###################
5
创制客户和组
[[email protected] ~]# groupadd mysql
[[email protected] ~]# useradd -r -g mysql mysql
[[email protected] ~]# id mysql
uid=495(mysql) gid=501(mysql) 组=501(mysql)
[[email protected] ~]#

6
解压mysql cluster包
[[email protected] mysql]# tar -zxvf mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64.tar.gz

[[email protected] mysql]# du -h mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64
。。。
1.6G mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64
[[email protected] mysql]#

[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll
总用量 168
drwxr-xr-x. 2 root root 4096 1月 22 17:47 bin
-rw-r--r--. 1 7161 wheel 17987 10月 9 21:46 COPYING
drwxr-xr-x. 3 root root 4096 1月 22 17:48 data
drwxr-xr-x. 2 root root 4096 1月 22 17:48 docs
drwxr-xr-x. 4 root root 4096 1月 22 17:48 include
-rw-r--r--. 1 7161 wheel 98601 10月 9 21:46 INSTALL-BINARY
drwxr-xr-x. 3 root root 4096 1月 22 17:48 lib
drwxr-xr-x. 4 root root 4096 1月 22 17:47 man
drwxr-xr-x. 10 root root 4096 1月 22 17:48 mysql-test
-rw-r--r--. 1 7161 wheel 2496 10月 9 21:46 README
drwxr-xr-x. 2 root root 4096 1月 22 17:48 scripts
drwxr-xr-x. 32 root root 4096 1月 22 17:47 share
drwxr-xr-x. 4 root root 4096 1月 22 17:48 sql-bench
drwxr-xr-x. 2 root root 4096 1月 22 17:48 support-files

[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll bin/
总用量 904716
-rwxr-xr-x. 1 7161 wheel 4708823 10月 9 22:43 innochecksum
-rw-r--r--. 1 7161 wheel 1057 10月 9 22:42 mcc_config.py
-rwxr-xr-x. 1 7161 wheel 494953 10月 9 22:43 memcached
-rwxr-xr-x. 1 7161 wheel 26309 10月 9 22:42 memclient
-rwxr-xr-x. 1 7161 wheel 1551 10月 9 22:42 msql2mysql
-rwxr-xr-x. 1 7161 wheel 7134628 10月 9 22:44 myisamchk
-rwxr-xr-x. 1 7161 wheel 6724681 10月 9 22:44 myisam_ftdump
-rwxr-xr-x. 1 7161 wheel 6612085 10月 9 22:44 myisamlog
-rwxr-xr-x. 1 7161 wheel 6809636 10月 9 22:44 myisampack
-rwxr-xr-x. 1 7161 wheel 4648990 10月 9 22:43 my_print_defaults
-rwxr-xr-x. 1 7161 wheel 8993255 10月 9 22:45 mysql
-rwxr-xr-x. 1 7161 wheel 111803 10月 9 22:42 mysqlaccess
-rwxr-xr-x. 1 7161 wheel 1702 10月 9 22:42 mysqlaccess.conf
-rwxr-xr-x. 1 7161 wheel 8025589 10月 9 22:45 mysqladmin
-rwxr-xr-x. 1 7161 wheel 8817442 10月 9 22:45 mysqlbinlog
-rwxr-xr-x. 1 7161 wheel 11088 10月 9 22:42 mysqlbug
-rwxr-xr-x. 1 7161 wheel 8002737 10月 9 22:45 mysqlcheck
-rwxr-xr-x. 1 7161 wheel 9051624 10月 9 22:45 mysql_client_test
-rwxr-xr-x. 1 7161 wheel 87950310 10月 9 22:46 mysql_client_test_embedded
-rwxr-xr-x. 1 7161 wheel 6590 10月 9 22:42 mysql_config
-rwxr-xr-x. 1 7161 wheel 7228312 10月 9 22:45 mysql_config_editor
-rwxr-xr-x. 1 7161 wheel 4334 10月 9 22:42 mysql_convert_table_format
-rwxr-xr-x. 1 7161 wheel 93009946 10月 9 22:46 mysqld
-rwxr-xr-x. 1 7161 wheel 119414426 10月 9 22:42 mysqld-debug
-rwxr-xr-x. 1 7161 wheel 26543 10月 9 22:42 mysqld_multi
-rwxr-xr-x. 1 7161 wheel 24805 10月 9 22:42 mysqld_safe
-rwxr-xr-x. 1 7161 wheel 8238061 10月 9 22:45 mysqldump
-rwxr-xr-x. 1 7161 wheel 7424 10月 9 22:42 mysqldumpslow
-rwxr-xr-x. 1 7161 wheel 87770340 10月 9 22:46 mysql_embedded
-rwxr-xr-x. 1 7161 wheel 3409 10月 9 22:42 mysql_find_rows
-rwxr-xr-x. 1 7161 wheel 1366 10月 9 22:42 mysql_fix_extensions
-rwxr-xr-x. 1 7161 wheel 34938 10月 9 22:42 mysqlhotcopy
-rwxr-xr-x. 1 7161 wheel 8015676 10月 9 22:45 mysqlimport
-rwxr-xr-x. 1 7161 wheel 4693968 10月 9 22:45 mysql_plugin
-rwxr-xr-x. 1 7161 wheel 10106 10月 9 22:42 mysql_secure_installation
-rwxr-xr-x. 1 7161 wheel 17572 10月 9 22:42 mysql_setpermission
-rwxr-xr-x. 1 7161 wheel 7995210 10月 9 22:45 mysqlshow
-rwxr-xr-x. 1 7161 wheel 8073926 10月 9 22:45 mysqlslap
-rwxr-xr-x. 1 7161 wheel 8661547 10月 9 22:45 mysqltest
-rwxr-xr-x. 1 7161 wheel 87269558 10月 9 22:46 mysqltest_embedded
-rwxr-xr-x. 1 7161 wheel 4377547 10月 9 22:43 mysql_tzinfo_to_sql
-rwxr-xr-x. 1 7161 wheel 4866948 10月 9 22:45 mysql_upgrade
-rwxr-xr-x. 1 7161 wheel 4646218 10月 9 22:43 mysql_waitpid
-rwxr-xr-x. 1 7161 wheel 3976 10月 9 22:42 mysql_zap
-rwxr-xr-x. 1 7161 wheel 13662188 10月 9 22:45 ndb_blob_tool
-rwxr-xr-x. 1 7161 wheel 6374280 10月 9 22:45 ndb_config
-rwxr-xr-x. 1 7161 wheel 29088929 10月 9 22:44 ndbd
-rwxr-xr-x. 1 7161 wheel 13647826 10月 9 22:45 ndb_delete_all
-rwxr-xr-x. 1 7161 wheel 13658297 10月 9 22:45 ndb_desc
-rwxr-xr-x. 1 7161 wheel 13636648 10月 9 22:45 ndb_drop_index
-rwxr-xr-x. 1 7161 wheel 13636686 10月 9 22:45 ndb_drop_table
-rwxr-xr-x. 1 7161 wheel 6206 10月 9 22:42 ndb_error_reporter
-rwxr-xr-x. 1 7161 wheel 14095556 10月 9 22:45 ndb_index_stat
-rwxr-xr-x. 1 7161 wheel 14561221 10月 9 22:45 ndbinfo_select_all
-rwxr-xr-x. 1 7161 wheel 7131043 10月 9 22:44 ndb_mgm
-rwxr-xr-x. 1 7161 wheel 16141964 10月 9 22:45 ndb_mgmd
-rwxr-xr-x. 1 7161 wheel 13757424 10月 9 22:45 ndb_move_data
-rwxr-xr-x. 1 7161 wheel 29256388 10月 9 22:44 ndbmtd
-rwxr-xr-x. 1 7161 wheel 5137404 10月 9 22:44 ndb_print_backup_file
-rwxr-xr-x. 1 7161 wheel 4880055 10月 9 22:45 ndb_print_file
-rwxr-xr-x. 1 7161 wheel 4832691 10月 9 22:44 ndb_print_schema_file
-rwxr-xr-x. 1 7161 wheel 4819461 10月 9 22:44 ndb_print_sys_file
-rwxr-xr-x. 1 7161 wheel 4851417 10月 9 22:44 ndb_redo_log_reader
-rwxr-xr-x. 1 7161 wheel 15181678 10月 9 22:45 ndb_restore
-rwxr-xr-x. 1 7161 wheel 13711687 10月 9 22:45 ndb_select_all
-rwxr-xr-x. 1 7161 wheel 13647237 10月 9 22:45 ndb_select_count
-rwxr-xr-x. 1 7161 wheel 1802 10月 9 21:46 ndb_setup.py
-rwxr-xr-x. 1 7161 wheel 13635801 10月 9 22:45 ndb_show_tables
-rwxr-xr-x. 1 7161 wheel 43994 10月 9 21:46 ndb_size.pl
-rwxr-xr-x. 1 7161 wheel 5738946 10月 9 22:45 ndb_waiter
-rwxr-xr-x. 1 7161 wheel 4819020 10月 9 22:44 perror
-rwxr-xr-x. 1 7161 wheel 4497866 10月 9 22:43 replace
-rwxr-xr-x. 1 7161 wheel 4647922 10月 9 22:43 resolveip
美高梅4858mgm,-rwxr-xr-x. 1 7161 wheel 4655497 10月 9 22:43 resolve_stack_dump
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#

[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll data/
总用量 4
drwxr-xr-x. 2 root root 4096 1月 22 17:48 test

[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll lib/
总用量 492108
-rw-r--r--. 1 7161 wheel 17288902 10月 9 22:45 libmysqlclient.a
lrwxrwxrwx. 1 7161 wheel 16 1月 22 17:47 libmysqlclient_r.a -> libmysqlclient.a
lrwxrwxrwx. 1 7161 wheel 17 1月 22 17:48 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx. 1 7161 wheel 20 1月 22 17:48 libmysqlclient_r.so.18 -> libmysqlclient.so.18
lrwxrwxrwx. 1 7161 wheel 24 1月 22 17:48 libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0
lrwxrwxrwx. 1 7161 wheel 20 1月 22 17:48 libmysqlclient.so -> libmysqlclient.so.18
lrwxrwxrwx. 1 7161 wheel 24 1月 22 17:48 libmysqlclient.so.18 -> libmysqlclient.so.18.1.0
-rwxr-xr-x. 1 7161 wheel 8138299 10月 9 22:45 libmysqlclient.so.18.1.0
-rw-r--r--. 1 7161 wheel 235071862 10月 9 22:46 libmysqld.a
-rw-r--r--. 1 7161 wheel 177976584 10月 9 22:41 libmysqld-debug.a
-rw-r--r--. 1 7161 wheel 14846 10月 9 22:43 libmysqlservices.a
lrwxrwxrwx. 1 7161 wheel 21 1月 22 17:48 libndbclient.so -> libndbclient.so.6.0.0
-rwxr-xr-x. 1 7161 wheel 19349092 10月 9 22:45 libndbclient.so.6.0.0
-rw-r--r--. 1 7161 wheel 29310630 10月 9 22:45 libndbclient_static.a
-rw-r--r--. 1 7161 wheel 754332 10月 9 22:38 libtcmalloc_minimal.so
-rwxr-xr-x. 1 7161 wheel 15990948 10月 9 22:45 ndb_engine.so
drwxr-xr-x. 3 root root 4096 1月 22 17:48 plugin
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll man/
总用量 8
drwxr-xr-x. 2 root root 4096 1月 22 17:47 man1
drwxr-xr-x. 2 root root 4096 1月 22 17:47 man8
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll mysql-test/
总用量 392
drwxr-xr-x. 2 root root 4096 1月 22 17:48 collections
drwxr-xr-x. 4 root root 4096 1月 22 17:48 extra
drwxr-xr-x. 2 root root 20480 1月 22 17:48 include
drwxr-xr-x. 4 root root 4096 1月 22 17:48 lib
lrwxrwxrwx. 1 7161 wheel 19 1月 22 17:48 mtr -> ./mysql-test-run.pl
-rwxr-xr-x. 1 7161 wheel 36862 10月 9 21:46 mysql-stress-test.pl
lrwxrwxrwx. 1 7161 wheel 19 1月 22 17:48 mysql-test-run -> ./mysql-test-run.pl
-rwxr-xr-x. 1 7161 wheel 197168 10月 9 21:46 mysql-test-run.pl
-rw-r--r--. 1 7161 wheel 1481 10月 9 21:46 purify.supp
drwxr-xr-x. 2 root root 40960 1月 22 17:48 r
-rw-r--r--. 1 7161 wheel 2813 10月 9 21:46 README
-rw-r--r--. 1 7161 wheel 655 10月 9 21:46 README.gcov
-rw-r--r--. 1 7161 wheel 4600 10月 9 21:46 README.stress
drwxr-xr-x. 5 root root 4096 1月 22 17:48 std_data
drwxr-xr-x. 27 root root 4096 1月 22 17:48 suite
drwxr-xr-x. 2 root root 40960 1月 22 17:48 t
-rw-r--r--. 1 7161 wheel 17965 10月 9 21:46 valgrind.supp
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#

[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll scripts/
总用量 36
-rwxr-xr-x. 1 7161 wheel 34544 10月 9 22:42 mysql_install_db
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll share/
总用量 1516
drwxr-xr-x. 2 root root 4096 1月 22 17:47 aclocal
drwxr-xr-x. 2 root root 4096 1月 22 17:47 bulgarian
drwxr-xr-x. 2 root root 4096 1月 22 17:47 charsets
drwxr-xr-x. 2 root root 4096 1月 22 17:47 czech
drwxr-xr-x. 2 root root 4096 1月 22 17:47 danish
-rw-r--r--. 1 7161 wheel 25575 10月 9 21:46 dictionary.txt
drwxr-xr-x. 2 root root 4096 1月 22 17:47 dutch
drwxr-xr-x. 2 root root 4096 1月 22 17:47 english
-rw-r--r--. 1 7161 wheel 505241 10月 9 21:46 errmsg-utf8.txt
drwxr-xr-x. 2 root root 4096 1月 22 17:47 estonian
-rw-r--r--. 1 7161 wheel 739146 10月 9 21:46 fill_help_tables.sql
drwxr-xr-x. 2 root root 4096 1月 22 17:47 french
drwxr-xr-x. 2 root root 4096 1月 22 17:47 german
drwxr-xr-x. 2 root root 4096 1月 22 17:47 greek
drwxr-xr-x. 2 root root 4096 1月 22 17:47 hungarian
-rw-r--r--. 1 7161 wheel 3963 10月 9 21:46 innodb_memcached_config.sql
drwxr-xr-x. 2 root root 4096 1月 22 17:47 italian
drwxr-xr-x. 2 root root 4096 1月 22 17:47 japanese
drwxr-xr-x. 2 root root 4096 1月 22 17:47 java
drwxr-xr-x. 2 root root 4096 1月 22 17:47 korean
drwxr-xr-x. 5 root root 4096 1月 22 17:47 mcc
drwxr-xr-x. 3 root root 4096 1月 22 17:47 memcache-api
-rw-r--r--. 1 7161 wheel 1695 10月 9 21:46 mysql_security_commands.sql
-rw-r--r--. 1 7161 wheel 3464 10月 9 21:46 mysql_system_tables_data.sql
-rw-r--r--. 1 7161 wheel 111746 10月 9 21:46 mysql_system_tables.sql
-rw-r--r--. 1 7161 wheel 10410 10月 9 21:46 mysql_test_data_timezone.sql
-rw-r--r--. 1 7161 wheel 10958 10月 9 21:46 ndb_dist_priv.sql
drwxr-xr-x. 9 root root 4096 1月 22 17:47 nodejs
drwxr-xr-x. 2 root root 4096 1月 22 17:47 norwegian
drwxr-xr-x. 2 root root 4096 1月 22 17:47 norwegian-ny
drwxr-xr-x. 2 root root 4096 1月 22 17:47 polish
drwxr-xr-x. 2 root root 4096 1月 22 17:47 portuguese
drwxr-xr-x. 2 root root 4096 1月 22 17:47 romanian
drwxr-xr-x. 2 root root 4096 1月 22 17:47 russian
drwxr-xr-x. 2 root root 4096 1月 22 17:47 serbian
drwxr-xr-x. 2 root root 4096 1月 22 17:47 slovak
drwxr-xr-x. 2 root root 4096 1月 22 17:47 spanish
drwxr-xr-x. 2 root root 4096 1月 22 17:47 swedish
drwxr-xr-x. 2 root root 4096 1月 22 17:47 ukrainian
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#

[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll sql-bench/
总用量 544
-rwxr-xr-x. 1 7161 wheel 7366 10月 9 22:42 bench-count-distinct
-rwxr-xr-x. 1 7161 wheel 15829 10月 9 22:42 bench-init.pl
-rwxr-xr-x. 1 7161 wheel 16212 10月 9 22:42 compare-results
-rwxr-xr-x. 1 7161 wheel 9821 10月 9 22:42 copy-db
-rwxr-xr-x. 1 7161 wheel 159022 10月 9 22:42 crash-me
drwxr-xr-x. 4 root root 4096 1月 22 17:48 Data
-rwxr-xr-x. 1 7161 wheel 22131 10月 9 22:42 graph-compare-results
-rwxr-xr-x. 1 7161 wheel 4825 10月 9 22:42 innotest1
-rwxr-xr-x. 1 7161 wheel 3893 10月 9 22:42 innotest1a
-rwxr-xr-x. 1 7161 wheel 3461 10月 9 22:42 innotest1b
-rwxr-xr-x. 1 7161 wheel 5064 10月 9 22:42 innotest2
-rwxr-xr-x. 1 7161 wheel 2793 10月 9 22:42 innotest2a
-rwxr-xr-x. 1 7161 wheel 3130 10月 9 22:42 innotest2b
drwxr-xr-x. 2 root root 4096 1月 22 17:48 limits
-rw-r--r--. 1 7161 wheel 4163 10月 9 22:42 README
-rwxr-xr-x. 1 7161 wheel 7258 10月 9 22:42 run-all-tests
-rwxr-xr-x. 1 7161 wheel 105307 10月 9 22:42 server-cfg
-rwxr-xr-x. 1 7161 wheel 6049 10月 9 22:42 test-alter-table
-rwxr-xr-x. 1 7161 wheel 25034 10月 9 22:42 test-ATIS
-rwxr-xr-x. 1 7161 wheel 4447 10月 9 22:42 test-big-tables
-rwxr-xr-x. 1 7161 wheel 9804 10月 9 22:42 test-connect
-rwxr-xr-x. 1 7161 wheel 7038 10月 9 22:42 test-create
-rwxr-xr-x. 1 7161 wheel 50677 10月 9 22:42 test-insert
-rwxr-xr-x. 1 7161 wheel 13830 10月 9 22:42 test-select
-rwxr-xr-x. 1 7161 wheel 7153 10月 9 22:42 test-transactions
-rwxr-xr-x. 1 7161 wheel 12028 10月 9 22:42 test-wisconsin
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]# ll support-files/
总用量 32
-rwxr-xr-x. 1 7161 wheel 1153 10月 9 22:42 binary-configure
-rw-r--r--. 1 7161 wheel 773 10月 9 21:46 magic
-rw-r--r--. 1 7161 wheel 1126 10月 9 22:42 my-default.cnf
-rwxr-xr-x. 1 7161 wheel 1061 10月 9 22:42 mysqld_multi.server
-rwxr-xr-x. 1 7161 wheel 894 10月 9 22:42 mysql-log-rotate
-rwxr-xr-x. 1 7161 wheel 10880 10月 9 22:42 mysql.server
[[email protected] mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64]#

7
解压的是早已编写翻译好的, 直接放到/usr/local/mysql,修改相关属主属组
luster-gpl-7.3.7-linux-glibc2.5-x86_64]# mv mysql-cluster-gpl-7.3.7-linux-glibc2.5-x86_64 /usr/local/mysql
luster-gpl-7.3.7-linux-glibc2.5-x86_64]# cd /usr/local/mysql
[[email protected] mysql]# chown -R root:mysql .
[[email protected] mysql]# chown -R mysql data/

8
创建MySQL Server系统表
[[email protected] mysql]# scripts/mysql_install_db --user=mysql
Installing MySQL system tables...2015-01-22 20:39:48 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-01-22 20:39:48 3032 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-01-22 20:39:48 3032 [Note] InnoDB: The InnoDB memory heap is disabled
2015-01-22 20:39:48 3032 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-01-22 20:39:48 3032 [Note] InnoDB: Memory barrier is not used
2015-01-22 20:39:48 3032 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-01-22 20:39:48 3032 [Note] InnoDB: Using Linux native AIO
2015-01-22 20:39:48 3032 [Note] InnoDB: Not using CPU crc32 instructions
2015-01-22 20:39:48 3032 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-01-22 20:39:48 3032 [Note] InnoDB: Completed initialization of buffer pool
2015-01-22 20:39:48 3032 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2015-01-22 20:39:48 3032 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2015-01-22 20:39:48 3032 [Note] InnoDB: Database physically writes the file full: wait...
2015-01-22 20:39:49 3032 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2015-01-22 20:39:49 3032 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2015-01-22 20:39:49 3032 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2015-01-22 20:39:49 3032 [Warning] InnoDB: New log files created, LSN=45781
2015-01-22 20:39:49 3032 [Note] InnoDB: Doublewrite buffer not found: creating new
2015-01-22 20:39:49 3032 [Note] InnoDB: Doublewrite buffer created
2015-01-22 20:39:49 3032 [Note] InnoDB: 128 rollback segment(s) are active.
2015-01-22 20:39:49 3032 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-01-22 20:39:49 3032 [Note] InnoDB: Foreign key constraint system tables created
2015-01-22 20:39:49 3032 [Note] InnoDB: Creating tablespace and datafile system tables.
2015-01-22 20:39:49 3032 [Note] InnoDB: Tablespace and datafile system tables created.
2015-01-22 20:39:49 3032 [Note] InnoDB: Waiting for purge to start
2015-01-22 20:39:49 3032 [Note] InnoDB: 5.6.21 started; log sequence number 0
2015-01-22 20:39:51 3032 [Note] Binlog end
2015-01-22 20:39:51 3032 [Note] InnoDB: FTS optimize thread exiting.
2015-01-22 20:39:51 3032 [Note] InnoDB: Starting shutdown...
2015-01-22 20:39:52 3032 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK

Filling help tables...2015-01-22 20:39:52 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-01-22 20:39:52 3054 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-01-22 20:39:52 3054 [Note] InnoDB: The InnoDB memory heap is disabled
2015-01-22 20:39:52 3054 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-01-22 20:39:52 3054 [Note] InnoDB: Memory barrier is not used
2015-01-22 20:39:52 3054 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-01-22 20:39:52 3054 [Note] InnoDB: Using Linux native AIO
2015-01-22 20:39:52 3054 [Note] InnoDB: Not using CPU crc32 instructions
2015-01-22 20:39:52 3054 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-01-22 20:39:52 3054 [Note] InnoDB: Completed initialization of buffer pool
2015-01-22 20:39:52 3054 [Note] InnoDB: Highest supported file format is Barracuda.
2015-01-22 20:39:52 3054 [Note] InnoDB: 128 rollback segment(s) are active.
2015-01-22 20:39:52 3054 [Note] InnoDB: Waiting for purge to start
2015-01-22 20:39:52 3054 [Note] InnoDB: 5.6.21 started; log sequence number 1625977
2015-01-22 20:39:53 3054 [Note] Binlog end
2015-01-22 20:39:53 3054 [Note] InnoDB: FTS optimize thread exiting.
2015-01-22 20:39:53 3054 [Note] InnoDB: Starting shutdown...
2015-01-22 20:39:54 3054 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h myqClter1 password 'new-password'

Alternatively you can run:

./bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:

cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

Please report any problems at

The latest information about MySQL is available on the web at

Support MySQL by buying support/licenses at

New default config file was created as ./my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings

[[email protected] mysql]#

9
布局运维脚本
[[email protected] mysql]# cp support-files/mysql.server /etc/init.d/mysqld
# 设置mysql服务为开机自运维
# chkconfig --add mysqld

#################
#上述第3-9步安排数据节点和SQL节点,依据规划在另风流洒脱台服务器做肖似操作
#################

#################
# 布置管理节点
#################

管理节点只需ndb_mgm和ndb_mgmd两个公文和三个配置文件,那四个文件从数额节点上copy就能够。
ndb_mgmd是 mysql cluster管理服务器,ndb_mgm是顾客端管理工具

10
[[email protected] mysql]# ll bin/ndb_mgm
ndb_mgm ndb_mgmd
[[email protected] mysql]# cp mysql/bin/ndb_mgm*/usr/local/bin
[[email protected] mysql]# ll /usr/local/bin/ndb_mgm*
-rwxr-xr-x. 1 root root 7131043 1月 22 21:25 /usr/local/bin/ndb_mgm
-rwxr-xr-x. 1 root root 16141964 1月 22 21:25 /usr/local/bin/ndb_mgmd

#################
# 配置
#################

11
安排mysql服务器成数据节点和SQL节点
[[email protected] mysql]# cp support-files/my-default.cnf /etc/my.cnf
[[email protected] mysql]# vi /etc/my.cnf
充实如下内容

[mysqld]
ndbcluster #运维NDB存款和储蓄引擎

[mysql_cluster]
ndb-connectstring=192.168.55.15 #管制节点IP

另一个节点上同生机勃勃操作
#scp /etc/my.cnf 192.168.55.16:/etc/
潜心两台服务器都得那般安插。

12
布局管理节点
[[email protected] mysql]# mkdir /var/lib/mysql-cluster
[[email protected] mysql]# vi /var/lib/mysql-cluster/config.ini
插足以下内容:

[ndbd default]
NoOfReplicas=2 #每一个数据节点的镜像数量
DataMemory=200M #各种数据节点中给多少分配的内部存款和储蓄器
IndexMemory=20M #各种数据节点中给索引分配的内部存储器

[tcp default]
portnumber=2202

[ndb_mgmd] #布局处理节点
#NodeId=1
hostname=192.168.55.15
datadir=/var/lib/mysql-cluster/ #管住节点 日志目录

[ndbd]
#数码节点配置,二个数据节点叁个[ndbd]
#NodeId=2
hostname=192.168.55.15
datadir=/usr/local/mysql/data/ #数据节点目录

[ndbd]
#NodeId=3
hostname=192.168.55.16
datadir=/usr/local/mysql/data/

[mysqld]
#SQL节点配置
hostname=192.168.55.15

[mysqld]
hostname=192.168.55.16

13
启动:
开发银行顺序:
关押节点->数据节点->SQL节点

启航扣留节点:
[[email protected] bin]# ndb_mgmd -f /var/lib/mysql-cluster/config.ini
MySQL Cluster Management Server mysql-5.6.21 ndb-7.3.7
[[email protected] bin]#

起步数量节点
[[email protected] bin]# ./ndbd --initial
2015-01-23 15:31:15 [ndbd] INFO -- Angel connected to '192.168.55.15:1186'
2015-01-23 15:31:15 [ndbd] INFO -- Angel allocated nodeid: 2
[[email protected] bin]#

运转第一个数据节点
[[email protected] bin]# ./ndbd --initial
Unable to connect with connect string: nodeid=0,192.168.55.15:1186
Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2015-01-23 15:35:50 [ndbd] ERROR -- Could not connect to management server, error: ''
[[email protected] bin]#

改正防火墙,松手1186端口
[[email protected] bin]# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1186 -j ACCEPT

[[email protected] bin]#
[[email protected] bin]# ./ndbd --initial
2015-01-23 15:36:34 [ndbd] INFO -- Angel connected to '192.168.55.15:1186'
2015-01-23 15:36:34 [ndbd] INFO -- Angel allocated nodeid: 3
[[email protected] bin]#

启动sql节点
[[email protected] bin]# ps -ef | grep mysql
root 3749 1 2 15:25 ? 00:00:33 ndb_mgmd -f /var/lib/mysql-cluster/config.ini
root 3920 3629 0 15:44 pts/1 00:00:00 grep mysql
[[email protected] bin]#
[[email protected] bin]# /etc/init.d/mysqld status
ERROR! MySQL is not running
[[email protected] bin]# /etc/init.d/mysqld start
Starting MySQL.......................................... SUCCESS!
[[email protected] bin]#
[[email protected] bin]# ps -ef | grep mysql
root 3749 1 2 15:25 ? 00:00:37 ndb_mgmd -f /var/lib/mysql-cluster/config.ini
root 3935 1 0 15:44 pts/1 00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/myqClter1.pid
mysql 4062 3935 1 15:44 pts/1 00:00:01 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/myqClter1.err --pid-file=/usr/local/mysql/data/myqClter1.pid
root 4176 3629 0 15:46 pts/1 00:00:00 grep mysql
[[email protected] bin]#

14
客商端管住使用/usr/local/bin/ndb_mgm

[[email protected] bin]# ls
ndb_mgm ndb_mgmd
[[email protected] bin]# ndb_mgm
-- NDB Cluster -- Management Client --

去check下状态
[[email protected] ~]# 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 @192.168.55.15 (mysql-5.6.21 ndb-7.3.7, starting, Nodegroup: 0)
id=3 @192.168.55.16 (mysql-5.6.21 ndb-7.3.7, starting, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.55.15 (mysql-5.6.21 ndb-7.3.7)

[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from 192.168.55.15)
id=5 (not connected, accepting connect from 192.168.55.16)

ndb_mgm>

#抽离管理工科具
ndb_mgm> quit
[[email protected] bin]#

15
简易测量检验:
利用mysql cluster中必要专心两点:
一是表必得用ENGINE=NDB或ENGINE=NDBCLUSTEXC90选项创立,使用ALTER TABLE选项改成也足以,以利用NDB Cluster存款和储蓄引擎在 Cluster内复制它们。
二是各种NDB表必须求有一个主键,若无,NDB Cluster存款和储蓄引擎将自动生成隐含主键。

连到sql节点1上,成立ndb引擎数据表beigang,插入数据,连到sql节点2上,查看beigang表数据,再插入数据,连到sql节点1翻看,没难题就OK了。

连天sql节点1,制造下表并插入数据:
[[email protected] bin]# ./mysql -h 192.168.55.15 -p test
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ndb_2_fs |
| ndbinfo |
| performance_schema |
| test |
+--------------------+
6 rows in set (0.00 sec)

mysql> use test;
Database changed
mysql> create table beigang(
-> id int not null auto_increment primary key,
-> name varchar(30) not null default ''
-> )engine = ndbcluster default charset utf8;
Query OK, 0 rows affected (0.21 sec)

mysql>
mysql> insert into beigang values(1, 'ndb t1');
Query OK, 1 row affected (0.14 sec)

mysql> insert into beigang values(2, 'ndb t2');
Query OK, 1 row affected (0.00 sec)

mysql>
mysql> select * from beigang;
+----+--------+
| id | name |
+----+--------+
| 1 | ndb t1 |
| 2 | ndb t2 |
+----+--------+
2 rows in set (0.13 sec)

mysql> q
Bye
[[email protected] bin]#

连到sql节点2上,查看beigang表数据,再插入数据:
[[email protected] bin]# ./mysql -h 192.168.55.16 -p test
Enter password:
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>
mysql> select * from beigang;
+----+--------+
| id | name |
+----+--------+
| 1 | ndb t1 |
| 2 | ndb t2 |
+----+--------+
2 rows in set (0.10 sec)

mysql> insert into beigang values(3, 'ndb t3');
Query OK, 1 row affected (0.09 sec)

mysql> q
Bye
[[email protected] bin]#

连到sql节点1翻看,没难题就OK了。
[[email protected] bin]# ./mysql -h 192.168.55.15 -p test
Enter password:
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>
mysql>
mysql>
mysql> select * from beigang;
+----+--------+
| id | name |
+----+--------+
| 3 | ndb t3 |
| 1 | ndb t1 |
| 2 | ndb t2 |
+----+--------+
3 rows in set (0.00 sec)

mysql> q
Bye

16
闭馆顺序应该是:
拘系节点->数据节点->SQL节点
命令ndb_mgm -e shutdown关闭管理节点和数据节点,sql节点/etc/init.d/mysqld stop关就足以了

[[email protected] bin]# ndb_mgm -e shutdown
Connected to Management Server at: 192.168.55.15:1186
3 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.
[[email protected] bin]#
[[email protected] bin]# /etc/init.d/mysqld stop
Shutting down MySQL..... SUCCESS!
[[email protected] bin]#
[[email protected] bin]# /etc/init.d/mysqld stop
Shutting down MySQL..... SUCCESS!

附:
ndb_mgmd和ndb_mgm的命令行参数:

[[email protected] bin]# ll
总用量 22728
-rwxr-xr-x. 1 root root 7131043 1月 22 21:25 ndb_mgm
-rwxr-xr-x. 1 root root 16141964 1月 22 21:25 ndb_mgmd
[[email protected] bin]# ndb_mgmd --help
MySQL Cluster Management Server mysql-5.6.21 ndb-7.3.7
Usage: ndb_mgmd [OPTIONS]
MySQL distrib mysql-5.6.21 ndb-7.3.7, for linux-glibc2.5 (x86_64)

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
The following groups are read: mysql_cluster ndb_mgmd
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file,
except for login file.
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=#
Also read groups with concat(group, suffix)
--login-path=# Read this path from the login file.

-?, --usage Display this help and exit.
-?, --help Display this help and exit.
-V, --version Output version information and exit.
-c, --ndb-connectstring=name
Set connect string for connecting to ndb_mgmd. Syntax:
"[nodeid=<id>;][host=]<hostname>[:<port>]". Overrides
specifying entries in NDB_CONNECTSTRING and my.cnf
--ndb-mgmd-host=name
same as --ndb-connectstring
--ndb-nodeid=# Set node id for this node. Overrides node id specified in
--ndb-connectstring.
--ndb-optimized-node-selection
Select nodes for transactions in a more optimal way
(Defaults to on; use --skip-ndb-optimized-node-selection to disable.)
-c, --connect-string=name
same as --ndb-connectstring
--core-file Write core on errors.
--character-sets-dir=name
Directory where character sets are.
-f, --config-file=name
Specify cluster configuration file
-P, --print-full-config
Print full config and exit
-d, --daemon Run ndb_mgmd in daemon mode (default)
(Defaults to on; use --skip-daemon to disable.)
--interactive Run interactive. Not supported but provided for testing
purposes
--no-nodeid-checks Do not provide any node id checks
--nodaemon Don't run as daemon, but don't read from stdin
--mycnf Read cluster config from my.cnf
--bind-address=name Local bind address
--configdir=name Directory for the binary configuration files (alias for
--config-dir)
--config-dir=name Directory for the binary configuration files
--config-cache Enable configuration cache and change management
(Defaults to on; use --skip-config-cache to disable.)
-v, --verbose Write more log messages
--reload Reload config from config.ini or my.cnf if it has changed
on startup
--initial Delete all binary config files and start from config.ini
or my.cnf
--log-name=name Name to use when logging messages for this node
--nowait-nodes=name Nodes that will not be waited for during start

Variables (--variable-name=value)

反省是从window下copy到liux下,有个别空格失效了。
修改/usr/local/mysql/cluster-conf/config.ini,将[NDBDDEFAULT]换成[NDBD DEFAULT],中间少了贰个空格。

and boolean options {FALSE|TRUE} Value (after reading options)


ndb-connectstring 192.168.55.15
ndb-mgmd-host 192.168.55.15
ndb-nodeid 0
ndb-optimized-node-selection TRUE
connect-string 192.168.55.15
core-file FALSE
character-sets-dir (No default value)
execute (No default value)
try-reconnect 3
verbose 1
[[email protected] bin]#
[[email protected] bin]#
[[email protected] bin]#
[[email protected] bin]#
[[email protected] bin]# ndb_mgm -e shutdown
Connected to Management Server at: 192.168.55.15:1186
3 NDB Cluster node(s) have shutdown.
Disconnecting to allow management server to shutdown.
[[email protected] bin]#

engine=ndbcluster恐怕engine=ndb的表本领利用Data node所存款和储蓄。其余engine即放在SQL node当地,犹如单机版相仿。
那东西用着怎么样就依附实际场景测吧,其连带的bug能够到

参考:
Chapter 18 MySQL Cluster NDB 7.3 and MySQL Cluster NDB 7.4


转发请著明出处:
blog.csdn.net/beiigang

MySQLCluster是sharednothing分布式架构,ndb存款和储蓄引擎把多少放置于内部存款和储蓄器中。能够完毕无单点故障。由运营于分歧服务...

shell> /usr/local/mysql5615/bin/mysqld --skip-grant &

NDB Cluster -- Management Client -- Help

HELP Print help text
HELP COMMAND Print detailed help for COMMAND(e.g. SHOW)
SHOW Print information about cluster
CREATE NODEGROUP <id>,<id>... Add a Nodegroup containing nodes
DROP NODEGROUP <NG> Drop nodegroup with id NG
START BACKUP [NOWAIT | WAIT STARTED | WAIT COMPLETED]
START BACKUP [<backup id>] [NOWAIT | WAIT STARTED | WAIT COMPLETED]
START BACKUP [<backup id>] [SNAPSHOTSTART | SNAPSHOTEND] [NOWAIT | WAIT STARTED | WAIT COMPLETED]
Start backup (default WAIT COMPLETED,SNAPSHOTEND)
ABORT BACKUP <backup id> Abort backup
SHUTDOWN Shutdown all processes in cluster
CLUSTERLOG ON [<severity>] ... Enable Cluster logging
CLUSTERLOG OFF [<severity>] ... Disable Cluster logging
CLUSTERLOG TOGGLE [<severity>] ... Toggle severity filter on/off
CLUSTERLOG INFO Print cluster log information
<id> START Start data node (started with -n)
<id> RESTART [-n] [-i] [-a] [-f] Restart data or management server node
<id> STOP [-a] [-f] Stop data or management server node
ENTER SINGLE USER MODE <id> Enter single user mode
EXIT SINGLE USER MODE Exit single user mode
<id> STATUS Print status
<id> CLUSTERLOG {<category>=<level>}+ Set log level for cluster log
PURGE STALE SESSIONS Reset reserved nodeid's in the mgmt server
CONNECT [<connectstring>] Connect to management server (reconnect if already connected)
<id> REPORT <report-type> Display report for <report-type>
QUIT Quit management client

<severity> = ALERT | CRITICAL | ERROR | WARNING | INFO | DEBUG
<category> = STARTUP | SHUTDOWN | STATISTICS | CHECKPOINT | NODERESTART | CONNECTION | INFO | ERROR | CONGESTION | DEBUG | BACKUP | SCHEMA
<report-type> = BACKUPSTATUS | MEMORYUSAGE | EVENTLOG
<level> = 0 - 15
<id> = ALL | Any database node id

For detailed help on COMMAND, use HELP COMMAND.
ndb_mgm> show
Connected to Management Server at: 192.168.55.15:1186

[[email protected] mysqlndb]# /etc/init.d/mysqldndbd status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
[[email protected] mysqlndb]# /etc/init.d/mysqldndbd status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
[[email protected] mysqlndb]# mv /var/lock/subsys/mysql /var/lock/subsys/mysql.bak
[[email protected] mysqlndb]# /etc/init.d/mysqldndbd start
Starting MySQL... SUCCESS!

ndb_mgm> help

Cluster Configuration

[ndbd(NDB)] 1 node(s)
id=4 (not connected, accepting connect from 10.88.49.124)

[ndb_mgmd(MGM)] 1 node(s)
id=1 @10.88.49.119 (mysql-5.5.35 ndb-7.2.15)

[mysqld(API)] 2 node(s)
id=10 (not connected, accepting connect from 10.88.49.122)
id=11 (not connected, accepting connect from 10.88.49.123)

ndb_mgm>
data node没有show出来,再去check下data node的日志:
more /var/lib/mysql-cluster/ndb_4_out.log

报错如下
Started thread, index = 33, id = 27480, type = NdbfsThread
WOPool::init(61, 9)
RWPool::init(22, 14)
LCPFragWatchdog : WarnElapsed : 20000(ms) MaxElapsed 60000(ms) : period millis : 10000
2014-02-25 10:03:10 [ndbd] WARNING -- timerHandlingLab, expected 10ms sleep, not scheduled for: 2638 (ms)
2014-02-25 10:03:10 [ndbd] WARNING -- Time moved forward with 3688 ms
blockSz: 800, wpp: 8188 -> 624 (76)
RWPool::init(29, 624)
RWPool::init(42, 16)
RWPool::init(62, 12)2014-02-25 10:03:11 [ndbd] WARNING -- Ndb kernel thread 0 is stuck in: Job Handling elapsed=100

2014-02-25 10:03:11 [ndbd] INFO -- Watchdog: User time: 27 System time: 439
2014-02-25 10:03:11 [ndbd] INFO -- Watchdog: User time: 27 System time: 441
2014-02-25 10:03:11 [ndbd] WARNING -- Watchdog: Warning overslept 453 ms, expected 100 ms.
2014-02-25 10:03:11 [ndbd] WARNING -- Ndb kernel thread 0 is stuck in: Job Handling elapsed=554
2014-02-25 10:03:11 [ndbd] INFO -- Watchdog: User time: 27 System time: 441
2014-02-25 10:03:11 [ndbd] WARNING -- Ndb kernel thread 0 is stuck in: Job Handling elapsed=749
2014-02-25 10:03:14 [ndbd] ALERT -- Node 4: Forced node shutdown completed. Occured during startphase 0. Initiated by signal 9.

平素在调动/usr/local/mysql/cluster-conf/config.ini的参数值,可是一向报相符的失实。
内部存款和储蓄器和目录参数都调动100M以下了,依旧报雷同的荒唐,确定不是内部存储器不足,去看管理节点的日记音讯
[[email protected] mysql-cluster1]# tail -f ndb_1_cluster.log
2014-02-25 20:08:25 [MgmtSrvr] ALERT -- Node 4: Forced node shutdown completed. Occured during startphase 0. Initiated by signal 9.
2014-02-25 20:19:00 [MgmtSrvr] INFO -- Loaded config from '/usr/local/mysql/mysql-cluster/ndb_1_config.bin.1'
2014-02-25 20:19:00 [MgmtSrvr] INFO -- Id: 1, Command port: *:1186
2014-02-25 20:19:00 [MgmtSrvr] INFO -- Node 1: Node 1 Connected
2014-02-25 20:19:00 [MgmtSrvr] INFO -- MySQL Cluster Management Server mysql-5.5.35 ndb-7.2.15 started
2014-02-25 20:19:00 [MgmtSrvr] INFO -- Node 1 connected
2014-02-25 20:19:18 [MgmtSrvr] INFO -- Nodeid 4 allocated for NDB at 10.88.49.124
2014-02-25 20:19:19 [MgmtSrvr] INFO -- Node 1: Node 4 Connected
2014-02-25 20:19:31 [MgmtSrvr] ALERT -- Node 1: Node 4 Disconnected
2014-02-25 20:19:33 [MgmtSrvr] ALERT -- Node 4: Forced node shutdown completed. Occured during startphase 0. Initiated by signal 9.

/usr/local/mysql/mysql-cluster/ndb_1_config.bin.1这些是怎么用的?貌似理论上尚无那个,删除试试。
rm -rf /usr/local/mysql/mysql-cluster/ndb_1_config.bin.1

下一场再度起动管制节点以至数据节点。
[[email protected] mysql-cluster1]# ndb_mgmd -f /usr/local/mysql/cluster-conf/config.ini
MySQL Cluster Management Server mysql-5.5.35 ndb-7.2.15
[[email protected] ~]# /usr/local/mysql/bin/ndbd --defaults-file=/etc/mycluster.cnf --initial
2014-02-25 10:42:29 [ndbd] INFO -- Angel connected to '10.88.49.119:1186'
2014-02-25 10:42:29 [ndbd] INFO -- Angel allocated nodeid: 4

去管理节点上show下,查看数据节点状态:
[[email protected] mysql-cluster1]# ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: localhost:1186

[[email protected] ~]# ndb_mgmd -f /usr/local/mysql/cluster-conf/config.ini
MySQL Cluster Management Server mysql-5.5.35 ndb-7.2.15
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- at line 1: Value specified outside section
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- at line 1: Could not parse name-value pair in config file.
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- Could not load configuration from '/usr/local/mysql/cluster-conf/config.ini'
2014-02-25 18:57:04 [MgmtSrvr] ERROR -- Could not determine which nodeid to use for this node. Specify it with --ndb-nodeid=<nodeid> on command line

6 start the cluster
6.1 start the management node
ndb_mgmd -f /usr/local/mysql/cluster-conf/config.ini

5.4 copy the config file
cp /usr/local/mysqlndb/my.cnf /etc/my.cnf

4.2 copy the run command file
cd mysql-cluster-gpl-7.2.15-linux2.6-x86_64
cp ./bin/ndbd /usr/local/mysql/bin
chown -R mysql:mysql /usr/local/mysql

3 install management node
tar -xvf mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz

Please report any problems with the /usr/local/mysqlndb//scripts/mysqlbug script!

Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at .

1 下载 Download the cluster tar.gz
wget

MySQL Cluster 7.2.15
Select Version: 下拉框接纳 7.2.15
Select Platform: 下拉框接纳 Linux Generic
然后再下边连接后生可畏栏里面选拔:
Linux - Generic 2.6 (x86, 64-bit), Compressed TAR Archive
(mysql-cluster-gpl-7.2.15-linux2.6-x86_64.tar.gz)

#######################################
#Change HOST1 to the name of the NDB_MGMD host
#Change HOST8 to the name of the NDBD host
#Change HOST9 to the name of the NDBD host
#######################################
[NDB_MGMD]
NodeId:1
HostName:10.88.49.119
ArbitrationRank:1
[NDBD]
NodeId:4
HostName:10.88.49.124

4.3 set the path
vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin

You can try to start the mysqld daemon with:

See the manual for more instructions.

shell> /usr/local/mysql5615/bin/mysql -u root mysql
mysql> show tables

5.7 copy the protect process
cp /usr/local/mysqlndb/support-files/mysql.server /etc/init.d/ndbdsql
布置守护进度
chkconfig --add ndbdsql
chkconfig --level 35 ndbdsql on
累计施行文书路线
vim ~/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysqlndb/bin
纠正配置文件
vim /etc/my.cnf
各自编写制定如下新闻:
[mysqld]#配备SQL节点与治本节点连接
port= 3307
socket= /tmp/mysql.sock
ndbcluster
ndb-connectstring=10.88.49.119

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

MaxNoOfConcurrentTransactions=10000
MaxNoOfConcurrentOperations=50000
MaxNoOfLocalOperations=55000
TimeBetweenGlobalCheckpoints=1000
TimeBetweenEpochs=100
TimeBetweenWatchdogCheckInitial=60000
TransactionBufferMemory=10M
DiskCheckpointSpeed=10M
DiskCheckpointSpeedInRestart=100M
TimeBetweenLocalCheckpoints=20
SchedulerSpinTimer=400
SchedulerExecutionTimer=100
RealTimeScheduler=1
BackupMaxWriteSize=1M
BackupDataBufferSize=16M
BackupLogBufferSize=4M
BackupMemory=20M

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /app/mysql that may be helpful.

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

######################################################
#Note: The following can be MySQLDconnections or #
# NDB API application connecting to thecluster #
######################################################
[API]
NodeId:10
HostName:10.88.49.122
ArbitrationRank:2

5.3 add the permission
chown -R mysql:mysql /usr/local/mysqlndb

本文由美高梅4858官方网站发布于美高梅4858mgm,转载请注明出处:15安装部署性能测试,centos65安装简测mysqlcluster7

关键词: