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

MySQL Cluster Multi Computer Configuration


For our four-node, four-host MySQL Cluster, it is necessary to
write four configuration files, one per node host.

Each data node or SQL node requires a
my.cnf
file that provides two pieces of
information: a connectstring
that tells
the node where to find the management node, and a line telling
the MySQL server on this host (the machine hosting the data
node) to enable the NDBCLUSTER
storage engine.

For more information on connectstrings, see
Section 3.2.3, “The MySQL Cluster Connectstring”
.

The management node needs a config.ini
file telling it how many replicas to maintain, how much memory
to allocate for data and indexes on each data node, where to
find the data nodes, where to save data to disk on each data
node, and where to find any SQL nodes.

Configuring the Storage and SQL
Nodes

The my.cnf
file needed for the data nodes is
fairly simple. The configuration file should be located in the
/etc
directory and can be edited using any
text editor. (Create the file if it does not exist.) For example:

shell> vi /etc/my.cnf
Note
We show vi
being used here to create the
file, but any text editor should work just as well.

For each data node and SQL node in our example setup,
my.cnf
should look like this:

# Options for mysqld process:
[mysqld]
ndbcluster # run NDB storage engine
ndb-connectstring=192.168.0.10 # location of management server
# Options for ndbd process:
[mysql_cluster]
ndb-connectstring=192.168.0.10 # location of management server
After entering the preceding information, save this file and exit
the text editor. Do this for the machines hosting data node
“A
”,


相关文档:

PHP + Apache + MySQL 安装配置

此文章的安装方法适用于Windows XP下的Apache+PHP+MySQL安装。 1. 安装环境
操作系统是 Windows XP 中文版, Apache, PHP, MySQL 的最新版本是截止到 2007.09.07,分别在其官网下载的:
* Apache 2.2.6:http://apache.mirror.phpchina.com/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 z ......

Mysql查询时,对于数值型字段加单引号会引起的误解~

假设有表 tb1
ID | name|
----+--------+
1   |2toon|
2   |1*xyz|
语句1:
 select * from  tb1 where ID='2toon' or name ='2toon';
mysql服务器在某模式下,可以执行这条句,就成功返回两条记录,原因在于 ID=‘2toon’ 加了单引号,mysql解释为 ID=2.
语句2
select * fro ......

mysql 时间函数

里是一个使用日期函数的例子。下面的查询选择了所有记录,其date_col的值是在最后30天以内: 
  mysql> SELECT something from table 
  WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30; 
   select   TO_DAYS(NOW());
   select now() ;
  DAYOFWEEK( ......

Mysql 错误 1067

启动Mysql 错误 1067 进程意外终止的一种解决方法
mysqld-nt --defaults-file=my.ini --standalone --console
查看信息内容
发现MYSQL INNODB初始化错误。
错误如下:
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
100115 10:14:04  InnoDB: Setti ......

VC++ 连接MySQL 数据库

把mysql.h复制到vc的目录的include目录下
mysql.h在你mysql的安装目录下的include里面如:mysql\include
把libmysql.lib(在mysql的安装目录下,搜索下就能找到)复制到这个目录下(C:\Program Files\Microsoft Visual Studio 9.0\VC\lib),要不连接会出错。
如果编译连接时还是出错。就把libmysql.lib复制到你源程序的目 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号