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

Safe Shutdown and Restart of MySQL Cluster


To shut down the cluster, enter the following command in a shell
on the machine hosting the management node:

shell> ndb_mgm -e shutdown
The -e
option here is used to pass a command to
the ndb_mgm
client from the shell. (See
Section 4.23, “Options Common to MySQL Cluster Programs”
, for more
information about this option.) The command causes the
ndb_mgm
, ndb_mgmd
, and any
ndbd
processes to terminate gracefully. Any SQL
nodes can be terminated using mysqladmin
shutdown
and other means.

To restart the cluster, run these commands:

On the management host (192.168.0.10
in our
example setup):

shell> ndb_mgmd -f /var/lib/mysql-cluster/config.ini
On each of the data node hosts
(192.168.0.30
and
192.168.0.40
):

shell> ndbd
On the SQL host (192.168.0.20
):

shell> mysqld_safe &
In a production setting, it is usually not desirable to shut down
the cluster completely. In many cases, even when making
configuration changes, or performing upgrades to the cluster
hardware or software (or both), which require shutting down
individual host machines, it is possible to do so without shutting
down the cluster as a whole by performing a rolling
restart
of the cluster. For more information about
doing this, see Section 2.6.1, “Performing a Rolling Restart of a MySQL Cluster”
.


相关文档:

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( ......

修改mysq连接数和启动mysql服务

my.cnf 或者是 my.ini
在[MySQL(和PHP搭配之最佳组合)d]配置段添加:
max_connections = 1000
保存,重启MySQL(和PHP搭配之最佳组合)服务。
然后用命令:
MySQL(和PHP搭配之最佳组合)admin -uroot -p variables 
输入root数据库账号的密码后可看到 
| max_connections | 1000 |
启动mysql服务
RedHat ......

mysql 一些简单操作 Rubicon

了解了一些最基本的操作命令后,我们再来学习如何创建一个数据库和数据库表。
  1、使用SHOW语句找出在服务器上当前存在什么数据库:
mysql> SHOW DATABASES; +----------+
| Database | +----------+ | mysql |
| test | +----------+ 3 rows in set (0.00 sec)
  2、创建一个数据库abccs
  mysql> ......

MySql常用命令

需注意以下三点:
1、创建数据库的时候:CREATE DATABASE `database`
                        CHARACTER SET 'utf8'
         ......

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
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号