Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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( ......

ʹÓÃÓαêʵÏÖ mysql ´æ´¢¹ý³ÌÖеÄÑ­»·

create   procedure   all_joiner_message(   in   captions   varchar(255),  in contents text,   in objectid int, in types int  ,  out count int)
begin
 declare   userids   int;
 DECLARE _done IN ......

mysql forige key


Love in coding...
    Free and Susan
[Òý]MySQL INNODBÀàÐͱíµÄÍâ¼ü¹ØÁªÉèÖÃ

Here is a simple example that relates parent and child tables through a single-column foreign key:
CREATE TABLE parent (id INT NOT NULL,
          ......

MysqlͨÓòéѯ²Ù×÷Àà(Jsp+servlet+javaBean+Mysql)

ÔÚÌÚ¿ÆÅàѵÁËÓÐ1¸ö°ëÔÂÁË£¬ÖÕÓÚѧÍêJSP+SERVLET+JAVABEAN+MYSQL£¬Ñ§ÁËjavaµÄµÚÒ»Ì×web½â¾ö·½°¸¡£ÀÏʦҪÇóÎÒÃÇ6ÈËÒ»×鿪ʼ×öÒ»¸ö¶©²Íϵͳ¡£Õâ¸öϵͳûÓÐʲôÌرðµÄ£¬¾Í¸úµç×ÓÉ̳ÇÊÇÒ»¸öÑùµÄ¡£ÓÉÓÚÒª¶ÔÊý¾Ý¿â×ö´óÁ¿µÄÔöɾ¸Ä²é£¬ÄǸö´úÂëÓֶ࣬ÎÒÏëÄܲ»Äܽ«Êý¾Ý¿â²Ù×÷µÄÕâÒ»²ã´ò°üÆðÀ´(SqlOperDao)£¬ÈÃÎÒ¶ÔÊý¾Ý¿â²Ù×÷£¬Óü¸Ðд ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ