易截截图软件、单文件、免安装、纯绿色、仅160KB

MySQL Cluster Configuration — Basic Example


To support MySQL Cluster, you will need to update
my.cnf
as shown in the following example.
You may also specify these parameters on the command line when
invoking the executables.

Note
The options shown here should not be confused with those that
are used in config.ini
global
configuration files. Global configuration options are
discussed later in this section.

# my.cnf
# example additions to my.cnf for MySQL Cluster
# (valid in MySQL 5.1)
# enable ndbcluster storage engine, and provide connectstring for
# management server host (default port is 1186)
[mysqld]
ndbcluster
ndb-connectstring=ndb_mgmd.mysql.com
# provide connectstring for management server host (default port: 1186)
[ndbd]
connect-string=ndb_mgmd.mysql.com
# provide connectstring for management server host (default port: 1186)
[ndb_mgm]
connect-string=ndb_mgmd.mysql.com
# provide location of cluster configuration file
[ndb_mgmd]
config-file=/etc/config.ini
(For more information on connectstrings, see
Section 3.2.3, “The MySQL Cluster Connectstring”
.)

# my.cnf
# example additions to my.cnf for MySQL Cluster
# (will work on all versions)
# enable ndbcluster storage engine, and provide connectstring for management
# server host to the default port 1186
[mysqld]
ndbcluster
ndb-connectstring=ndb_mgmd.mysql.com:1186
Important
Once you have started a mysqld
process with
the NDBCLUSTER
and
ndb-connectstring
parameters in the
[mysqld]
in the my.cnf
file as shown previously, you cannot execute any
CREATE TABLE
or
ALTER TABLE
statements without
having actually started the cluster. Otherwise, these
statements will fail with an error. This is by
design
.

You may also use a separate [mysql_cluster]


相关文档:

MySQL优化总结


表设计方面:
1、字段名尽量简化,不要超过18个字符
2、使用尽量小的数据类型,例如:MEDIUMINT比INT少占用25%空间
3、字段类型应尽量避免设置成可变长度,如:VARCHAR、BLOB、TEXT
4、用于比较的不同字段,应设置相同的类型及长度
5、尽可能将字段声明为NOT NULL,并指定DEFAULT
6、主索引尽可能短
7、仅创建真正 ......

mysql数据库函数

查询语句:
SELECT 字段名 from 表名.
排序 order by 要排序的字段名 desc :以倒序查询.
limit 从第几个开始 查找多少个 :查找指定个数.
同时查询多个字段用","隔开.
如查询表里面的所有数据在字段名处填"*".
如只想显示某字段的前几位字符可以使用LEFT函数.
SELECT 字段名,LEFT(字段名,位数),字段名 from 表名.
COU ......

MySQL Cluster Overview


MySQL Cluster
is a technology that enables
clustering of in-memory databases in a shared-nothing system. The
shared-nothing architecture allows the system to work with very
inexpensive hardware, and with a minimum of specific requirements
for hardware or software.

......

MYSQL数据库优化摘录

1、选取最适用的字段属性
  MySQL可以很好的支持大数据量的存取,但是一般说来,数据库中的表越小,在它上面执行的查询也就会越快。因此,在创建表的时候,为了获得更好的性能,我们可以将表中字段的宽度设得尽可能小。例如,在定义邮政编码这个字段时,如果将其设置为CHAR(255),显然给数据库增加了不必要的空间,甚至使 ......

【转】常用mysql操作命令

   
Administration 管理
Kill a Thread  结束一个线程
mysql > KILL 999;
 
Optimize Table 优化表
mysql > OPTIMEZE TABLE foo;
 
Reload Users Permissions 刷新MySQL系统权限相关表  
mysql > FLUSH PRIVILEGES;
 
Repair Table 修复表
mysql > ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号