MySQL´æ´¢ÒýÇæ
MySQLÓжàÖÖ´æ´¢ÒýÇ棺
MyISAM¡¢InnoDB¡¢MERGE¡¢MEMORY(HEAP)¡¢BDB(BerkeleyDB)¡¢EXAMPLE¡¢FEDERATED¡¢ARCHIVE¡¢CSV¡¢BLACKHOLE¡£
MySQLÖ§³ÖÊý¸ö´æ´¢ÒýÇæ×÷Ϊ¶Ô²»Í¬±íµÄÀàÐ͵Ĵ¦ÀíÆ÷¡£MySQL´æ´¢ÒýÇæ°üÀ¨´¦ÀíÊÂÎñ°²È«±íµÄÒýÇæºÍ´¦Àí·ÇÊÂÎñ°²È«±íµÄÒýÇ棺
¡ô MyISAM¹ÜÀí·ÇÊÂÎñ±í¡£ËüÌṩ¸ßËÙ´æ´¢ºÍ¼ìË÷£¬ÒÔ¼°È«ÎÄËÑË÷ÄÜÁ¦¡£MyISAMÔÚËùÓÐMySQLÅäÖÃÀï±»Ö§³Ö£¬ËüÊÇĬÈϵĴ洢ÒýÇ棬³ý·ÇÄãÅäÖÃMySQLĬÈÏʹÓÃÁíÍâÒ»¸öÒýÇæ¡£
¡ô MEMORY´æ´¢ÒýÇæÌṩ“ÄÚ´æÖД±í¡£MERGE´æ´¢ÒýÇæÔÊÐí¼¯ºÏ½«±»´¦ÀíͬÑùµÄMyISAM±í×÷Ϊһ¸öµ¥¶ÀµÄ±í¡£¾ÍÏñMyISAMÒ»Ñù£¬MEMORYºÍMERGE´æ´¢ÒýÇæ´¦Àí·ÇÊÂÎñ±í£¬ÕâÁ½¸öÒýÇæÒ²¶¼±»Ä¬ÈÏ°üº¬ÔÚMySQLÖС£
×¢ÊÍ£ºMEMORY´æ´¢ÒýÇæÕýʽµØ±»È·¶¨ÎªHEAPÒýÇæ¡£
¡ô InnoDBºÍBDB´æ´¢ÒýÇæÌṩÊÂÎñ°²È«±í¡£BDB±»°üº¬ÔÚΪ֧³ÖËüµÄ²Ù×÷ϵͳ·¢²¼µÄMySQL-Max¶þ½øÖÆ·Ö·¢°æÀï¡£InnoDBҲĬÈϱ»°üÀ¨ÔÚËù ÓÐMySQL 5.1¶þ½øÖÆ·Ö·¢°æÀÄã¿ÉÒÔ°´ÕÕϲºÃͨ¹ýÅäÖÃMySQLÀ´ÔÊÐí»ò½ûÖ¹ÈÎÒ»ÒýÇæ¡£
¡ô EXAMPLE´æ´¢ÒýÇæÊÇÒ»¸ö“´æ¸ù”ÒýÇ棬Ëü²»×öʲô¡£Äã¿ÉÒÔÓÃÕâ¸öÒýÇæ´´½¨±í£¬µ«Ã»ÓÐÊý¾Ý±»´æ´¢ÓÚÆäÖлò´ÓÆäÖмìË÷¡£Õâ¸öÒýÇæµÄÄ¿µÄÊÇ·þÎñ£¬ÔÚ MySQLÔ´´úÂëÖеÄÒ»¸öÀý×Ó£¬ËüÑÝʾ˵Ã÷ÈçºÎ¿ªÊ¼±àдд洢ÒýÇ档ͬÑù£¬ËüµÄÖ÷ÒªÐËȤÊǶԿª·¢Õß¡£
¡ô NDB ClusterÊDZ»MySQL ClusterÓÃÀ´ÊµÏַָ¶ą̀¼ÆËã»úÉϵıíµÄ´æ´¢ÒýÇæ¡£ËüÔÚMySQL-Max 5.1¶þ½øÖÆ·Ö·¢°æÀïÌṩ¡£Õâ¸ö´æ´¢ÒýÇ浱ǰֻ±»Linux, Solaris, ºÍMac OS X Ö§³Ö¡£ÔÚδÀ´µÄMySQL·Ö·¢°æÖУ¬ÎÒÃÇÏëÒªÌí¼ÓÆäËüƽ̨¶ÔÕâ¸öÒýÇæµÄÖ§³Ö£¬°üÀ¨Windows¡£
¡ô ARCHIVE´æ´¢ÒýÇæ±»ÓÃÀ´ÎÞË÷ÒýµØ£¬·Ç³£Ð¡µØ¸²¸Ç´æ´¢µÄ´óÁ¿Êý¾Ý¡£
¡ô CSV´æ´¢ÒýÇæ°ÑÊý¾ÝÒÔ¶ººÅ·Ö¸ôµÄ¸ñʽ´æ´¢ÔÚÎı¾ÎļþÖС£
¡ô BLACKHOLE´æ´¢ÒýÇæ½ÓÊܵ«²»´æ´¢Êý¾Ý£¬²¢ÇÒ¼ìË÷×ÜÊÇ·µ»ØÒ»¸ö¿Õ¼¯¡£
¡ô FEDERATED´æ´¢ÒýÇæ°ÑÊý¾Ý´æÔÚÔ¶³ÌÊý¾Ý¿âÖС£ÔÚMySQL 5.1ÖУ¬ËüÖ»ºÍMySQLÒ»Æð¹¤×÷£¬Ê¹ÓÃMySQL C Client API¡£ÔÚδÀ´µÄ·Ö·¢°æÖУ¬ÎÒÃÇÏëÒªÈÃËüʹÓÃÆäËüÇý¶¯Æ÷»ò¿Í»§¶ËÁ¬½Ó·½·¨Á¬½Óµ½ÁíÍâµÄÊý¾ÝÔ´¡£
µ±Äã´´½¨Ò»¸öбíµÄʱºò£¬Äã¿ÉÒÔͨ¹ýÌí¼ÓÒ»¸öENGINE »òTYPE Ñ¡Ïîµ½CREATE TABLEÓï¾äÀ´¸æËßMySQLÄãÒª´´½¨Ê²Ã´ÀàÐÍµÄ±í£º
CREATE TABLE t (i INT) ENGINE = INNODB;
CREATE TABLE t (i INT) TYPE = MEMORY;
ËäÈ»TYPEÈÔÈ»ÔÚMySQL 5.1Öб»Ö§³Ö£¬ÏÖÔÚENGINEÊÇÊ×Ñ¡µÄÊõÓï¡£
ÈçºÎÑ¡Ôñ×îÊʺÏÄãµÄ´æ´¢ÒýÇæÄØ£¿
ÏÂÊö´æ´¢ÒýÇæÊÇ×î³£Óõģº
¡ô MyISAM£ºÄ
Ïà¹ØÎĵµ£º
1,Íü¼ÇrootÃÜÂë,Èç¹ûÄÜ»¹ÄܽøÈëmysqlÇÒ»¹ÓÐmysql¿âµÄȨÏÞ,ÄÇô¾ÍÖ±½ÓÖ´ÐÐ update user set password=password(¡®XXX¡¯) where user=¡¯root¡¯ and host=¡¯XX¡¯; flush privileges; ¼´¿É.Èç¹û²»ÄܽøÈëmysql,ÐèÒªÓÐmysqlÆô¶¯µÄȨÏÞ,ÔÚÆô¶¯mysqlµÄʱºò¼ÓÉÏ--skip-grant-tablesÑ¡Ïî,´Ëʱ½øÈëmysqlÎÞÐèÃÜÂë,ÔÙÖظ´ÉÏÊö²Ù ......
½ñÌìÔÚ°ïÅóÓѵ÷ÊÔÒ»¸ö¹ØÓÚ¶àÏ̷߳ÃÎÊͬһÕűíÒýÆðµÄLock wait timeout exceedeµÄÎÊÌ⣬¸Ð¾õÒýÆðµÄÔÒòÓУº
1£¬Ã»ÓнøÐÐÓÅ»¯£¬¾¡Á¿±ÜÃâ¶àÏß³Ì
2£¬¸ù¾ÝËüºóÃ汨µÄÒì³££¬ÌáÐÑÎÒ¿ÉÒÔHibernate µÄSessionûÓÐʹÓõõ±£¬(Ò²ÊÇÎÒ½â¾öµÄ·½°¸)
3£¬ÓÃsynchronizedÐÞÊθüбíµÄº¯Êý
¹À¼ÆÊÇÔÀ´³ÌÐòÔÚÐÞ¸ÄÍê¸Ã±íʱÁ¢¿Ì½øÐÐÁ˲åÈë²Ù× ......
´ËÎÄÕÂÖ÷ÒªÃèÊöµÄÊÇMySQLÊý¾ÝÀàÐÍÓ뽨¿â²ßÂÔµÄÏêϸ½âÎö£¬ÎÒÃÇ´ó¼Ò¶¼ÖªµÀÎÞÂÛÊÇÔÚ²»ÊշѵÄÊý¾Ý¿â¿Õ¼ä»òÕßÊÇ´óÐ͵ĵç×ÓÉÌÎñÍøÕ¾£¬ÆäºÏÀíµÄÉè¼Æ±í½á¹¹¡¢³ä·ÖÀûÓÿռäÊÇÊ®·Ö±ØÒªµÄ¡£
¡¡¡¡Õâ¾ÍÒªÇóÎÒÃǶÔÊý¾Ý¿âϵͳµÄ³£ÓÃMySQLÊý¾ÝÀàÐÍÓгä·ÖµÄÈÏʶ¡£ÏÂÃæÎҾͽ«ÎÒµÄÒ»µãÐĵÃд³öÀ´¸ú´ó¼Ò·ÖÏí¡£
¡¡¡¡Ò»¡¢MySQLÊý¾ÝÀàÐÍÖ®Êý×ÖÀàÐ ......
Ê×ÏȽ¨Ò»¸ö¹¤³Ì£¬×¼±¸ºÃÒ»¸ölog4jµÄjar°üºÍÁ¬½ÓMySqLµÄÇý¶¯°ü¡£ÅäÖÃÈçÏ£º
ÐÞ¸Älog4j.propertiesÎļþ£º
######## #´Ë¾äΪ¶¨ÒåÃûΪstdoutµÄÊä³ö¶ËÊÇÄÄÖÖÀàÐÍ£¬¿ÉÒÔÊÇ
#org.apache.log4j.ConsoleAppender£¨¿ØÖÆ̨£©£¬
#org.apache.log4j.FileAppender£¨Îļþ£©£¬
#org.apache.log4j.DailyRollingFileAppender£¨Ã¿Ìì²úÉúÒ» ......
1£® °²×°Cygwin
ÔËÐÐCygwinµÄ°²×°³ÌÐò¡£´ÓÎļû°üµÄµÄÁбíÖУ¬ÔÚDEVÀïÃ棬ȷ¶¨ÒªÑ¡Ôñ
• Ruby
• gcc
• subversion
ÄãÐèҪʹÓÃgccÀ´½¨Á¢Cygwin°æ±¾µÄMySQL.
2. ÔÚwindowsÉÏÃæ°²×°MYSQL£º
download MySQL 5.0 Windows Installer
3£® & ......