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
”,
相关文档:
里是一个使用日期函数的例子。下面的查询选择了所有记录,其date_col的值是在最后30天以内:
mysql> SELECT something from table
WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) <= 30;
select TO_DAYS(NOW());
select now() ;
DAYOFWEEK( ......
1。 改表法。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"
mysql -u root -p
mysql>use mysql;
mysql>update user set& ......
运行环境:windows xp sp2
IIS v5.1
PHP 5.3.1-Win32-VC9-x86
Mysql 5.0
安装步骤:
安装IIS5.1
在 ......
以下内容在ubuntu 9.04 server系统上测试通过
用apt-get install vsftp安装的时候相关的文件位置:
主配置文件:/etc/vsftpd.conf
验证配置文件/etc/pam.d/vsftpd
重启:/etc/init.d/vsftpd restart
vsftp Mysql验证方式:
MYSQL已经安装在/usr/local/mysql
直接安装vsftp
sudo apt-get install vsftp
安装pam_mys ......
把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复制到你源程序的目 ......