MySQL¼¯ÈºÊµ¼ùÏê½âϵÁÐÖ®¶þ£ºÈçºÎ°²×°Management Node
±ÊÕߣ¨mqboss£©½üÆÚÔÚ×öMySQL¼¯ÈºµÄ¼¼Êõµ÷ÑУ¬»á½Ðø°Ñ×Ô¼ºµÄÐĵÃÌå»áд³öÀ´ºÍ´ó¼Ò·ÖÏí£¬Çë´ó¼Ò¼ÌÐø¹Ø×¢¡£
1.´Ómysq¹Ù·½ÍøÕ¾ÏÂÔØ°²×°Îļþmysql-cluster-gpl-7.0.9-solaris10-sparc-64bit.tar.gz£¬²¢Í¨¹ýFTPÉÏ´«µ½Solaris·þÎñÆ÷ÉÏ£»
2.Ìí¼ÓÓû§×émysqlºÍÓû§mysql(×¢£ºmysqlÓû§ÊôÓÚmysqlÓû§×é)
shell> groupadd mysql
shell> useradd -g mysql mysql
3.½øÈëmysql-cluster-gpl-7.0.9-solaris10-sparc-64bit.tar.gzÎļþËùÔÚµÄĿ¼£¬½âѹËõ¸ÃÎļþ£º
µÃµ½Îļþ¼Ðmysql-cluster-gpl-7.0.9-solaris10-sparc-64bit£¬ÎªÁË·½±ãÆð¼û£¬°Ñ¸ÃÎļþÃûÖØÃüÃûΪmysql-cluster-7.0.9£»
´Ë´¦¼Ù¶¨¸ÃÎļþ¼ÐÔÚĿ¼/var/tmpÏ£¬ÒÀ´ÎÖ´ÐÐÒÔÏÂÃüÁ
shell> cd /var/tmp
shell> cd mysql-cluster-7.0.9
shell> cp bin/ndb_mgm* /usr/local/bin
Ä¿µÄÊÇ°Ñndb_mgmºÍndb_mgmd¿½±´µ½/usr/local/binĿ¼ÏÂ
´Ëºó£¬¿ÉÒÔ·ÅÐĵİÑmysql-cluster-7.0.9Îļþ¼Ðɾ³ý
4.½øÈë/usr/local/binĿ¼Ï£¬²¢ÊÚÓèndb_mgmºÍndb_mgmd¿ÉÖ´ÐÐȨÏÞ£¬¾ßÌåÈçÏ£º
shell> cd /usr/local/bin
shell> chmod +x ndb_mgm*
×÷Õß¼ò½é£º mqboss ÊÇ×÷Õß±ÊÃû£¬Ôø¾ÍÖ°ÓÚÆÕÌìºÍÖÐÐË£¬ÏÖÔÚÒ»ÍâÆó¹¤×÷£¬Ò»Ö±´ÓÊÂͨÐÅÈí¼þµÄ²âÊÔ¡¢¿ª·¢ÓëÉè¼Æ¹¤×÷£¬×¨×¢ÓÚJAVA, J2EE, WEB, DBµÈÁìÓòµÄÀíÂÛÑо¿¡¢²âÊÔ¡¢¿ª·¢ÓëÉè¼Æ
Ïà¹ØÎĵµ£º
1.mysqlÊÇÒ»¸ö·Ç³£·½±ãµÄ¹ÜÀímysql·þÎñÆ÷µÄ¿Í»§¶ËÈí¼þ¡£ ´´½¨Ò»¸ömysql·þÎñÆ÷µÄÁ¬½ÓµÄʱºòÓ¦¸Ã×¢ÒâÌîдÐÅÏ¢µÄʱºòÏÈÔÚ×¢²áÀ¸ÌîдµÇ½Óû§ÃûºÍÃÜÂ룬ÔÙÔÚÁ¬½ÓÀ¸Ìîд·þÎñÆ÷Ãû£¬¶Ë¿ÚºÅ¡£
2.ʹÓÃmysql-frontµÄʱºò£¬½¨Á¢Ò»¸öµÇ½ÊôÐÔÒÔºó£¬ÔÙÔÚÃüÁîÐвÙ×÷mysqlÊý¾Ý¿â£¬mysql-frontµÄÊý¾ÝÐèÒªÊÖ¶¯Í¬²½²Å¿ÉÒÔ¿´µ½Ê¹ÓÃÃüÁîÐжÔÊý¾ ......
mysqlÔÚsdkÖÐΪcÓïÑÔÌṩÁËһЩ·ÃÎʽӿڣ¬ÎÒÃÇ¿ÉÒÔʹÓÃÕâЩ½Ó¿ÚÁ¬½Ó²¢·ÃÎÊmysqlÊý¾Ý¿â£¬µ±È»Ò²¿ÉÒÔµ÷ÓÃmysqlµÄ´æ´¢¹ý³Ì¡£
Àý×Ó£º
Ê×ÏÈÏÂÔØmysqlµÄsdk£¬½âѹºÃÒÔºó£¬ÀïÃæ°üº¬Ò»¸öinclude,ºÍlibÎļþ¼Ð¡£ÎÒÃÇÔÚ×Ô¼ºµÄ¹¤³ÌÖаüº¬ÕâÁ½¸öÎļþ¼ÐµÄĿ¼£¬²¢Ç ......
²âÊÔ»·¾³£ºUbuntu 9.10 + MySQL 5.1.37-1ubuntu5
Ubuntu ÔÚÆô¶¯¹ÜÀí init.d
ÀïÃæ¹ØÓÚ MySQL µÄÃüÁîÓУº
/etc/init.d/mysql start|stop|restart|reload|force-reload|status
ÀýÈçÖØÆôMySQL·þÎñ£ºsudo /etc/init.d/mysql restart
......
Êý¾Ý¿âµÄÓÅ»¯ÊÇϵͳÓÅ»¯µÄÖØÒª·½Ã棬¶øÊý¾Ý¿âÓÅ»¯µÄ»ù´¡ÊÇ»ùÓÚͳ¼ÆÊý¾Ý£¬ÏÂÃæµÄÕâЩÃüÁî¿ÉÒÔ°ïÖúÎÒÃÇÁ˽âÊý¾Ý¿âµÄ״̬¡£±ÈÈçÓÃshow table status from ecl where rows>10000;¿ÉÒÔ¿´ÄÄЩÊý¾Ý¿â±í±È½Ï´ó£¬È»ºó¿´¿´ÕâЩ±íµÄÉèÖá¢Ë÷ÒýµÈÊÇ·ñÓÐÎÊÌâ¡£
1. show tables»òshow tables from dat ......
Á˽âÁËһЩ×î»ù±¾µÄ²Ù×÷ÃüÁîºó£¬ÎÒÃÇÔÙÀ´Ñ§Ï°ÈçºÎ´´½¨Ò»¸öÊý¾Ý¿âºÍÊý¾Ý¿â±í¡£
1¡¢Ê¹ÓÃSHOWÓï¾äÕÒ³öÔÚ·þÎñÆ÷Éϵ±Ç°´æÔÚʲôÊý¾Ý¿â£º
mysql> SHOW DATABASES;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
3 rows in set (0.00 sec) ......