¡¾×ª¡¿mysql½â¾ö×Ô¶¯¶Ï¿ª8СʱδÔøÓùýµÄÁ´½Ó
http://www.cnblogs.com/neonlight/archive/2008/08/25/1276178.html
½üÒ»¶Îʱ¼ä£¬ºÜ¶à²¿ÃÅͬÊ·´Ó³ÔÚʹÓÃmysqlµÄ¹ý³Ì³öÏÖÊý¾Ý¿âÁ¬½Ó×Ô¶¯¶Ï¿ªµÄÎÊÌ⣬ÎÒ¶Ô¸ÃÎÊÌâ×öÁËһЩʵÑé¡£
¹ØÓÚmysql×Ô¶¯¶Ï¿ªµÄÎÊÌâÑо¿½á¹ûÈçÏ£¬ÔÚmysqlÖÐÓÐÏà¹Ø²ÎÊýÉ趨£¬µ±Êý¾Ý¿âÁ¬½Ó¿ÕÏÐÒ»¶¨Ê±¼äºó£¬·þÎñÆ÷¾Í
»á¶Ï¿ªµÈ´ý³¬Ê±µÄÁ¬½Ó£º
1¡¢Ïà¹Ø²ÎÊý£¬ºìÉ«²¿·Ö
mysql> show variables like '%timeout%';
+--------------------------+-------+
| Variable_name¡¡¡¡¡¡¡¡¡¡¡¡| Value |
+--------------------------+-------+
| connect_timeout¡¡¡¡¡¡¡¡ | 5¡¡¡¡¡¡|
| delayed_insert_timeout¡¡ | 300¡¡ |
| innodb_lock_wait_timeout| 50¡¡¡¡ |
| interactive_timeout¡¡¡¡¡¡ | 28800 |
| net_read_timeout¡¡¡¡¡¡¡¡| 30¡¡¡¡ |
| net_write_timeout¡¡¡¡¡¡ | 60¡¡¡¡ |
| slave_net_timeout¡¡¡¡¡¡ | 3600¡¡|
| wait_timeout¡¡¡¡¡¡¡¡¡¡¡¡ | 28800 |
+--------------------------+-------+
ͬһʱ¼ä£¬ÕâÁ½¸ö²ÎÊýÖ»ÓÐÒ»¸öÆð×÷Óᣵ½µ×ÊÇÄĸö²ÎÊýÆð×÷Ó㬺ÍÓû§Á¬½Óʱָ¶¨µÄÁ¬½Ó²ÎÊýÏà¹Ø£¬È±Ê¡Çé¿öÏÂÊÇʹÓÃ
wait_timeout¡£ÎÒ½¨ÒéÊǽ«ÕâÁ½¸ö²ÎÊý¶¼Ð޸ģ¬ÒÔÃâÒýÆð²»±ØÒªµÄÂé·³¡£
2¡¢Ð޸IJÎÊý
ÕâÁ½¸ö²ÎÊýµÄĬÈÏÖµÊÇ8Сʱ¡£ÎÒ²âÊÔ¹ý½«ÕâÁ½¸ö²ÎÊý¸ÄΪ0£¬½á¹û³öÈËÒâÁÏ£¬ÏµÍ³×Ô¶¯½«Õâ¸öÖµÉèÖÃΪ1¡£»»¾ä»°Ëµ£¬²»Äܽ«¸ÃÖµÉèÖÃΪÓÀ¾Ã¡£ÎÒ½¨ÒéΪ²ÎÊýÖµ¼ÓÈý¸ö0£¬ÕâÑù¿Ï¶¨¿ÉÒÔÂú×ãÎÒÃǵÄÓ¦ÓÃÒªÇó¡£
Ð޸IJÙ×÷£º´ò¿ª/etc/my.cnf,ÔÚÊôÐÔ×émysqldÏÂÃæÌí¼Ó²ÎÊýÈçÏ£º
[mysqld]
interactive_timeout=28800000
wait_timeout=28800000
windowsÏÂÔÚmy.iniÎÄÖÐÔö¼Ó£º
interactive_timeout=28800000
wait_timeout=28800000
Ïà¹ØÎĵµ£º
ÔÚ±¾ÎÄÖУ¬ÎÒÃǽ«Ñ§Ï°ÈçºÎͨ¹ýPHP 5µÄÒ»¸ö»ù±¾³éÏóÀàʹÓÃÍâ¼üÔ¼ÊøÀ´¸üÐÂÁ½¸öInnoDB±íµÄÊý¾Ý¡£ ÎÒÃǽ«Í¨¹ý¾ßÌåʾÀýÀ´ËµÃ÷ÈçºÎͨ¹ý·þÎñÆ÷¶Ë½Å±¾ÓïÑÔÀ´Ê¹ÓÃÍâ¼üÔ¼Êø¡£
¡¡¡¡Ò»¡¢ÀûÓÃÍâ¼üÔ¼Êø¸üÐÂMySQLÖеÄÊý¾Ý
¡¡¡¡ÏÖÔÚ£¬×îÁ÷ÐеĿªÔ´¹ØϵÐÍÊý¾Ý¿â¹ÜÀíϵͳ·ÇMySQLĪÊô£¬¶øMySQLÓÖÖ§³Ö¶à¸ö´æ´¢ÒýÇ棬ÆäÖÐĬÈϵÄÒ²ÊÇËٶȽϿìµÄ´ ......
Ðè×¢ÒâÒÔÏÂÈýµã£º
1¡¢´´½¨Êý¾Ý¿âµÄʱºò£ºCREATE DATABASE `database`
CHARACTER SET 'utf8'
  ......
Starting the cluster is not very difficult after it has been configured. Each cluster node process must be started separately, and on the host where it resides. The management node should be started first, followed by the data nodes, and then finally by any SQL nodes:
On the management host, issu ......
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, “ ......