- 浏览: 88595 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
xiaoyi829:
应该可以grzrt 写道分区表partition,能用hand ...
初识mysql插件之HandlerSocket -
grzrt:
分区表partition,能用handlersocket查询指 ...
初识mysql插件之HandlerSocket
MySQL NDB 安装的安装,配置与测试
MySQL NDB 安装
下载:mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23.tar.gz
配置之前,需要先从理论上好好系统把握一下mysql ndb的配置方法,这样可以少走很多弯路.
一:配置前的规划
管理节点IP: 192.168.133.98 节点ID: id=1
NDB数据节点1: 192.168.133.101 节点ID: id=2
NDB数据节点2: 192.168.133.102 节点ID: id=3
mysql节点1: 192.168.133.62 节点ID: id=4
mysql节点2: 192.168.133.100 节点ID: id=5
OS:Centos 5.4 64位,4GB内存,5台都是虚拟机,都是运行在Vmware vsphere上的.
[root@localhost ndbdatabase]# uname -a
[root@localhost ndbdatabase] #:Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
--------------------------------------------------------------------------------
二:开始安装
A,安装数据节点与mysql节点,以下操作重复4次,在除管理节点以外的其他的节点上执行:
#groupadd mysql
#useradd –g mysql mysql
#tar zxvf mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23.tar.gz
#chown mysql:mysql mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23
#cd mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23
#mv * /usr/local/mysql
上述命令先创建mysql组和mysql用户,并且把MySQL分配到MySQL组,然后将安装文件解压,把它放置到/usr/local/mysql目录。
---------------------------------------------------------------------------------
三:配置
配置管理节点[192.168.133.98]:
创建以下文件/var/lib/mysql-cluster/config.ini,并在其中添加如下内容:
[NDBD DEFAULT]
NoOfReplicas=2 #2表示节点
DataMemory=100M
IndexMemory=100M
[TCP DEFAULT]
portnumber=2202
#管理节点
[NDB_MGMD]
id=1
hostname=192.168.133.98
datadir=/var/lib/mysql-cluster
#第一个ndbd节点
[NDBD]
id=2
hostname=192.168.133.101
datadir=/usr/local/mysql/ndbdata
#第二个ndbd节点
[NDBD]
id=3
hostname=192.168.133.102
datadir=/usr/local/mysql/ndbdata
#SQL node
[mysqld]
id=4
hostname=192.168.133.62
[mysqld]
id=5
hostname=192.168.133.100
在这个文件里,我们分别给四个节点分配了ID,这有利于更好的管理和区分各个节点。当然,要是不指定,MySQL也会动态分配一个。上述几个Datadir如果还不存在的需要手动创建。用mkdir –p命令即可。
--------------------------------------------------------------------------------
四:配置数据节点[192.168.133.101, 192.168.133.102]:
创建/etc/my.cnf文件,内容如下
# Options for mysqld process:
[mysqld]
datadir=/usr/local/mysql/ndbdata
[mysql_cluster]
ndb-connectstring = 192.168.133.98
--------------------------------------------------------------------------------
五:配置SQL节点[192.168.133.62,192.168.133.100]
创建/etc/my.cnf文件,内容如下
# Options for mysqld process:
[mysqld]
ndbcluster # run NDB storage engine
ndb-connectstring=192.168.133.98 # location of management server
# Options for ndbd process:
[mysql_cluster]
ndb-connectstring=192.168.133.98 # location of management server
[root@ndba bin]./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf
Installing MySQL system tables...
OK
Filling help tables...
OK
到这里,所有配置已经完成了。
--------------------------------------------------------------------------------
六:启动
启动管节点[192.168.133.98]:
[root@localhost bin]# ./ndb_mgmd -f /var/lib/mysql-cluster/config.ini
[root@localhost bin]# ./ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.133.98:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.133.101)
id=3 (not connected, accepting connect from 192.168.133.102)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.133.98 (Version: 7.1.10)
[mysqld(API)] 1 node(s)
id=4 (not connected, accepting connect from 192.168.133.62)
id=5 (not connected, accepting connect from 192.168.133.100)
我们可以看到集群的状态都还没有启动,都是not connected状态。
--------------------------------------------------------------------------------
七:启动数据节点[192.168.133.101, 192.168.133.102]:
[root@localhost ~]#cd /usr/local/mysql/bin
[root@localhost bin]#./ndbd
启动SQL节点[192.168.133.62,192.168.133.100]:
[root@localhost mysql]# ./bin/mysqld_safe &
至此,所有节点已经启动完成,让我们来查看系统状态:
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.133.101 (Version: 7.1.10, Nodegroup: 0, Master)
id=3 @192.168.133.102 (Version: 7.1.10, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.133.98 (Version: 7.1.10)
[mysqld(API)] 2 node(s)
id=4 @192.168.133.62 (Version: 7.1.10)
id=5 @192.168.133.100 (Version: 7.1.10)
--------------------------------------------------------------------------------
八:测试:
在192.168.133.62上执行以下命令:
#mysql
mysql> use ndbdatabase;
Database changed
mysql> create table test (id int) engine=ndb;
Query OK, 0 rows affected (0.10 sec)
mysql> show create table test\G;
*************************** 1. row ***************************
Table: test
Create Table: CREATE TABLE `test` (
`id` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
ERROR:
No query specified
mysql> insert into test values(1);
Query OK, 1 row affected (0.00 sec)
mysql> select * from test;
+------+
| id |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>
在192.168.133.100上执行以下命令,验证以上操作:
[root@localhost test]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.51-ndb-7.1.10-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ndbdatabase |
| ndbinfo |
| test |
+--------------------+
5 rows in set (0.01 sec)
mysql> use ndbdatabase;
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_ndbdatabase |
+-----------------------+
| test |
+-----------------------+
1 row in set (0.00 sec)
mysql> show create table test\G;
*************************** 1. row ***************************
Table: test
Create Table: CREATE TABLE `test` (
`id` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.02 sec)
ERROR:
No query specified
mysql> select * from test;
+------+
| id |
+------+
| 1 |
+------+
1 row in set (0.01 sec)
mysql>
验证表明,集群工作正常.
--------------------------------------------------------------------------------
九:破坏性测试:
1,关闭其中一个数据节点,验证结果表明,集群工作正常,
以下操作在数据节点2[192.168.133.102]上执行,如下:
[root@localhost bin]# ps -ef | grep ndbd
root 7541 1 0 01:52 ? 00:00:00 ./ndbd –nodeid=3 –initial
root 7542 7541 0 01:52 ? 00:02:39 ./ndbd –nodeid=3 –initial
root 9931 3295 0 20:47 pts/1 00:00:00 grep ndbd
[root@localhost bin]# kill 7541 7542
[root@localhost bin]# ps -ef | grep ndbd
root 9933 3295 0 20:47 pts/1 00:00:00 grep ndbd
[root@localhost bin]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:B8:00:13
inet addr:192.168.133.102 Bcast:192.168.133.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:feb8:13/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19511513 errors:0 dropped:0 overruns:0 frame.:0
TX packets:19957492 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1781288143 (1.6 GiB) TX bytes:1899963551 (1.7 GiB)
Base address:0x2000 Memory:d8920000-d8940000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:597990 errors:0 dropped:0 overruns:0 frame.:0
TX packets:597990 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51521498 (49.1 MiB) TX bytes:51521498 (49.1 MiB)
[root@localhost bin]#
--------------------------------------------------------------------------------
十:去管理节点看集群的状态:
ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.133.101 (Version: 7.1.10, Nodegroup: 0, Master)
id=3 (not connected, accepting connect from 192.168.133.102)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.133.98 (Version: 7.1.10)
[mysqld(API)] 2 node(s)
id=4 @192.168.133.62 (Version: 7.1.10)
id=5 @192.168.133.100 (Version: 7.1.10)
ndb_mgm>
表明192.168.133.102上的数据节点确实当掉了.
去mysql节点1[192.168.133.62]做如下操作:
[root@localhost setup]# mysql
[root@localhost setup]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:B8:00:0F
inet addr:192.168.133.62 Bcast:192.168.133.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:feb8:f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7603400 errors:0 dropped:0 overruns:0 frame.:0
TX packets:4072260 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:684602777 (652.8 MiB) TX bytes:402432650 (383.7 MiB)
Base address:0x2000 Memory:d8920000-d8940000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:203352 errors:0 dropped:0 overruns:0 frame.:0
TX packets:203352 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11961759 (11.4 MiB) TX bytes:11961759 (11.4 MiB)
[root@localhost setup]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.51-ndb-7.1.10-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ndbdatabase |
| ndbinfo |
| test |
+--------------------+
5 rows in set (0.00 sec)
mysql> use ndbdatabase;
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_ndbdatabase |
+-----------------------+
| test |
+-----------------------+
1 row in set (0.01 sec)
mysql> select * from test;
+------+
| id |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>
以上操作表明在一个数据节点当机后,集群依然工作正常
MySQL NDB 安装
下载:mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23.tar.gz
配置之前,需要先从理论上好好系统把握一下mysql ndb的配置方法,这样可以少走很多弯路.
一:配置前的规划
管理节点IP: 192.168.133.98 节点ID: id=1
NDB数据节点1: 192.168.133.101 节点ID: id=2
NDB数据节点2: 192.168.133.102 节点ID: id=3
mysql节点1: 192.168.133.62 节点ID: id=4
mysql节点2: 192.168.133.100 节点ID: id=5
OS:Centos 5.4 64位,4GB内存,5台都是虚拟机,都是运行在Vmware vsphere上的.
[root@localhost ndbdatabase]# uname -a
[root@localhost ndbdatabase] #:Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
--------------------------------------------------------------------------------
二:开始安装
A,安装数据节点与mysql节点,以下操作重复4次,在除管理节点以外的其他的节点上执行:
#groupadd mysql
#useradd –g mysql mysql
#tar zxvf mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23.tar.gz
#chown mysql:mysql mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23
#cd mysql-cluster-gpl-7.1.10-linux-x86_64-glibc23
#mv * /usr/local/mysql
上述命令先创建mysql组和mysql用户,并且把MySQL分配到MySQL组,然后将安装文件解压,把它放置到/usr/local/mysql目录。
---------------------------------------------------------------------------------
三:配置
配置管理节点[192.168.133.98]:
创建以下文件/var/lib/mysql-cluster/config.ini,并在其中添加如下内容:
[NDBD DEFAULT]
NoOfReplicas=2 #2表示节点
DataMemory=100M
IndexMemory=100M
[TCP DEFAULT]
portnumber=2202
#管理节点
[NDB_MGMD]
id=1
hostname=192.168.133.98
datadir=/var/lib/mysql-cluster
#第一个ndbd节点
[NDBD]
id=2
hostname=192.168.133.101
datadir=/usr/local/mysql/ndbdata
#第二个ndbd节点
[NDBD]
id=3
hostname=192.168.133.102
datadir=/usr/local/mysql/ndbdata
#SQL node
[mysqld]
id=4
hostname=192.168.133.62
[mysqld]
id=5
hostname=192.168.133.100
在这个文件里,我们分别给四个节点分配了ID,这有利于更好的管理和区分各个节点。当然,要是不指定,MySQL也会动态分配一个。上述几个Datadir如果还不存在的需要手动创建。用mkdir –p命令即可。
--------------------------------------------------------------------------------
四:配置数据节点[192.168.133.101, 192.168.133.102]:
创建/etc/my.cnf文件,内容如下
# Options for mysqld process:
[mysqld]
datadir=/usr/local/mysql/ndbdata
[mysql_cluster]
ndb-connectstring = 192.168.133.98
--------------------------------------------------------------------------------
五:配置SQL节点[192.168.133.62,192.168.133.100]
创建/etc/my.cnf文件,内容如下
# Options for mysqld process:
[mysqld]
ndbcluster # run NDB storage engine
ndb-connectstring=192.168.133.98 # location of management server
# Options for ndbd process:
[mysql_cluster]
ndb-connectstring=192.168.133.98 # location of management server
[root@ndba bin]./scripts/mysql_install_db --user=mysql --defaults-file=/etc/my.cnf
Installing MySQL system tables...
OK
Filling help tables...
OK
到这里,所有配置已经完成了。
--------------------------------------------------------------------------------
六:启动
启动管节点[192.168.133.98]:
[root@localhost bin]# ./ndb_mgmd -f /var/lib/mysql-cluster/config.ini
[root@localhost bin]# ./ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.133.98:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.133.101)
id=3 (not connected, accepting connect from 192.168.133.102)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.133.98 (Version: 7.1.10)
[mysqld(API)] 1 node(s)
id=4 (not connected, accepting connect from 192.168.133.62)
id=5 (not connected, accepting connect from 192.168.133.100)
我们可以看到集群的状态都还没有启动,都是not connected状态。
--------------------------------------------------------------------------------
七:启动数据节点[192.168.133.101, 192.168.133.102]:
[root@localhost ~]#cd /usr/local/mysql/bin
[root@localhost bin]#./ndbd
启动SQL节点[192.168.133.62,192.168.133.100]:
[root@localhost mysql]# ./bin/mysqld_safe &
至此,所有节点已经启动完成,让我们来查看系统状态:
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.133.101 (Version: 7.1.10, Nodegroup: 0, Master)
id=3 @192.168.133.102 (Version: 7.1.10, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.133.98 (Version: 7.1.10)
[mysqld(API)] 2 node(s)
id=4 @192.168.133.62 (Version: 7.1.10)
id=5 @192.168.133.100 (Version: 7.1.10)
--------------------------------------------------------------------------------
八:测试:
在192.168.133.62上执行以下命令:
#mysql
mysql> use ndbdatabase;
Database changed
mysql> create table test (id int) engine=ndb;
Query OK, 0 rows affected (0.10 sec)
mysql> show create table test\G;
*************************** 1. row ***************************
Table: test
Create Table: CREATE TABLE `test` (
`id` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
ERROR:
No query specified
mysql> insert into test values(1);
Query OK, 1 row affected (0.00 sec)
mysql> select * from test;
+------+
| id |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>
在192.168.133.100上执行以下命令,验证以上操作:
[root@localhost test]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.1.51-ndb-7.1.10-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ndbdatabase |
| ndbinfo |
| test |
+--------------------+
5 rows in set (0.01 sec)
mysql> use ndbdatabase;
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_ndbdatabase |
+-----------------------+
| test |
+-----------------------+
1 row in set (0.00 sec)
mysql> show create table test\G;
*************************** 1. row ***************************
Table: test
Create Table: CREATE TABLE `test` (
`id` int(11) DEFAULT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.02 sec)
ERROR:
No query specified
mysql> select * from test;
+------+
| id |
+------+
| 1 |
+------+
1 row in set (0.01 sec)
mysql>
验证表明,集群工作正常.
--------------------------------------------------------------------------------
九:破坏性测试:
1,关闭其中一个数据节点,验证结果表明,集群工作正常,
以下操作在数据节点2[192.168.133.102]上执行,如下:
[root@localhost bin]# ps -ef | grep ndbd
root 7541 1 0 01:52 ? 00:00:00 ./ndbd –nodeid=3 –initial
root 7542 7541 0 01:52 ? 00:02:39 ./ndbd –nodeid=3 –initial
root 9931 3295 0 20:47 pts/1 00:00:00 grep ndbd
[root@localhost bin]# kill 7541 7542
[root@localhost bin]# ps -ef | grep ndbd
root 9933 3295 0 20:47 pts/1 00:00:00 grep ndbd
[root@localhost bin]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:B8:00:13
inet addr:192.168.133.102 Bcast:192.168.133.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:feb8:13/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19511513 errors:0 dropped:0 overruns:0 frame.:0
TX packets:19957492 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1781288143 (1.6 GiB) TX bytes:1899963551 (1.7 GiB)
Base address:0x2000 Memory:d8920000-d8940000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:597990 errors:0 dropped:0 overruns:0 frame.:0
TX packets:597990 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51521498 (49.1 MiB) TX bytes:51521498 (49.1 MiB)
[root@localhost bin]#
--------------------------------------------------------------------------------
十:去管理节点看集群的状态:
ndb_mgm> show
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.133.101 (Version: 7.1.10, Nodegroup: 0, Master)
id=3 (not connected, accepting connect from 192.168.133.102)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.133.98 (Version: 7.1.10)
[mysqld(API)] 2 node(s)
id=4 @192.168.133.62 (Version: 7.1.10)
id=5 @192.168.133.100 (Version: 7.1.10)
ndb_mgm>
表明192.168.133.102上的数据节点确实当掉了.
去mysql节点1[192.168.133.62]做如下操作:
[root@localhost setup]# mysql
[root@localhost setup]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:56:B8:00:0F
inet addr:192.168.133.62 Bcast:192.168.133.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:feb8:f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7603400 errors:0 dropped:0 overruns:0 frame.:0
TX packets:4072260 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:684602777 (652.8 MiB) TX bytes:402432650 (383.7 MiB)
Base address:0x2000 Memory:d8920000-d8940000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:203352 errors:0 dropped:0 overruns:0 frame.:0
TX packets:203352 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11961759 (11.4 MiB) TX bytes:11961759 (11.4 MiB)
[root@localhost setup]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.1.51-ndb-7.1.10-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ndbdatabase |
| ndbinfo |
| test |
+--------------------+
5 rows in set (0.00 sec)
mysql> use ndbdatabase;
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_ndbdatabase |
+-----------------------+
| test |
+-----------------------+
1 row in set (0.01 sec)
mysql> select * from test;
+------+
| id |
+------+
| 1 |
+------+
1 row in set (0.00 sec)
mysql>
以上操作表明在一个数据节点当机后,集群依然工作正常
发表评论
-
给开发者看的关系型数据库设计
2013-08-06 11:17 736目录 一 Codd的RDBMS12法则——RDBMS的起源 ... -
MySQL数据库服务器端核心参数详解和推荐配置3
2013-03-19 14:31 704l innodb_flush_log_at_trx_com ... -
MySQL数据库服务器端核心参数详解和推荐配置2
2013-03-19 14:29 821l innodb_commit_concurrency ... -
MySQL数据库服务器端核心参数详解和推荐配置1
2013-03-19 14:24 772l lower_case_table_names Li ... -
MySQL5.5数据库my.cnf配置文件模板
2013-03-19 13:46 967引用 #*******以下开始为配置文件模板 [mysqld ... -
MySQL5.5数据库my.cnf配置文件模板
2013-03-19 13:40 0#*******以下开始为配置文件模板 [mysqld] ... -
mysql5.6 Nosql, innodb 安装和配置以及主从镜像模式下可能产生的问题
2013-03-15 16:16 1263一些可以参考的文章: http://blogs.innodb ... -
mysql5.6memcache安装
2013-03-15 16:14 908下载地址: http://labs.mysql.com 选 ... -
MySQL常用存储引擎优化
2013-01-07 15:49 956MySQL 提供的非常丰富的存储引擎种类供大家选择,有多种 ... -
SQL执行过程原理
2012-11-13 15:23 750如下图: http://dl.iteye.com/upload ... -
innotop
2012-10-10 20:13 736INNOTOP是一个通过文本模 ... -
mysql中用percona-toolkit监视死锁
2012-10-10 15:27 800percona,是mysql的一个分支了,相信不少朋友都很熟悉 ... -
MYSQL 5.6新特性介绍
2012-10-10 15:09 1105官方参考: http://dev.mysql.com/doc/ ... -
初识mysql插件之HandlerSocket
2011-12-30 15:35 1114HandlerSocket是日本人写的一个mysql插件,具体 ... -
快速关闭MySQL/InnoDB
2011-11-13 20:35 823如果用的引擎是InnoDB,每次敲下mysqladmin -u ...
相关推荐
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL 2.7....
如果集群配置有更新了:rm /usr/local/mysql/mysql-cluster/ndb_1_config.bin.1 3)停止SQL节点的命令:/usr/local/mysql/bin/mysqladmin -uroot shutdown 4)SQL Node上连接MySQL:/usr/local/mysql/bin/mysql -u ...
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL ...
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL 2.7....
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL 2.7....
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL ...
• 2.1 LVS 安装、配置 • 2.2 MySQL Cluster安装 • 3、测试 • 3.1 mysqlslap测试结果 • 3.2 sysbench测试结果 1、前言 随着数据量规模的扩大,企业对 MySQL 的要求就不仅仅是能用了,也在寻求各种高...
在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装...
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL...
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL 2.7....
2.3.14. 在Windows环境下对MySQL安装的故障诊断与排除 2.3.15. 在Windows下升级MySQL 2.3.16. Windows版MySQL同Unix版MySQL对比 2.4. 在Linux下安装MySQL 2.5.在Mac OS X中安装MySQL 2.6. 在NetWare中安装MySQL 2.7....
16.3 MySQL Cluster配置详细介绍(config.ini) 16.4 MySQL Cluster基本管理与维护 16.5 基本优化思路 16.6 小结 第17章 高可用设计思路及方案 17.0 引言 17.1 利用Replication来实现高可用架构 17.2 利用...
安装和配置 btsync。 要求 厨师 0.10.10+。 平台 Ubuntu、Debian 测试: Ubuntu 10.04-12.04 属性 用法 在提供管理服务器和 MySQL 服务器的节点上,同时使用 mgmd 和 mysqld 配方: { "run_list": ["recipe[bt...