Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MysqlÓÅ»¯·½°¸Ö®Ë÷ÒýµÄʹÓÃ

 
Ë÷ÒýÓÃÓÚ¿ìËÙÕÒ³öÔÚij¸öÁÐÖÐÓÐÒ»Ìض¨ÖµµÄÐС£²»Ê¹ÓÃË÷Òý£¬MySQL±ØÐë´ÓµÚ1Ìõ¼Ç¼¿ªÊ¼È»ºó¶ÁÍêÕû¸ö±íÖ±µ½ÕÒ³öÏà¹ØµÄÐС£±íÔ½´ó£¬»¨·ÑµÄʱ¼äÔ½¶à¡£Èç¹û±íÖвéѯµÄÁÐÓÐÒ»¸öË÷Òý£¬MySQLÄÜ¿ìËÙµ½´ïÒ»¸öλÖÃÈ¥ËÑÑ°µ½Êý¾ÝÎļþµÄÖм䣬ûÓбØÒª¿´ËùÓÐÊý¾Ý¡£Èç¹ûÒ»¸ö±íÓÐ1000ÐУ¬Õâ±È˳Ðò¶ÁÈ¡ÖÁÉÙ¿ì100±¶¡£×¢ÒâÈç¹ûÄãÐèÒª·ÃÎʴ󲿷ÖÐУ¬Ë³Ðò¶ÁÈ¡Òª¿ìµÃ¶à£¬ÒòΪ´ËʱÎÒÃDZÜÃâ´ÅÅÌËÑË÷¡£
 
´ó¶àÊýMySQLË÷Òý(PRIMARY KEY¡¢UNIQUE¡¢INDEXºÍFULLTEXT)ÔÚBÊ÷Öд洢¡£Ö»ÊÇ¿Õ¼äÁÐÀàÐ͵ÄË÷ÒýʹÓÃR-Ê÷£¬²¢ÇÒMEMORY±í»¹Ö§³ÖhashË÷Òý¡£
 
×Ö·û´®×Ô¶¯µØѹËõǰ׺ºÍ½áβ¿Õ¸ñ¡£
 
×ܵÄÀ´Ëµ£¬°´ºóÃæµÄÌÖÂÛʹÓÃË÷Òý¡£±¾½Ú×îºóÃèÊöhashË÷Òý(ÓÃÓÚMEMORY±í)µÄÌØÕ÷¡£
 
Ë÷ÒýÓÃÓÚÏÂÃæµÄ²Ù×÷£º
 
·         ¿ìËÙÕÒ³öÆ¥ÅäÒ»¸öWHERE×Ó¾äµÄÐС£
 
·         ɾ³ýÐС£Èç¹û¿ÉÒÔÔÚ¶à¸öË÷ÒýÖнøÐÐÑ¡Ôñ£¬MySQLͨ³£Ê¹ÓÃÕÒµ½×îÉÙÐеÄË÷Òý¡£
 
·         µ±Ö´ÐÐÁª½Óʱ£¬´ÓÆäËü±í¼ìË÷ÐС£
 
·         ¶Ô¾ßÌåÓÐË÷ÒýµÄÁÐkey_colÕÒ³öMAX()»òMIN()Öµ¡£ÓÉÔ¤´¦ÀíÆ÷½øÐÐÓÅ»¯£¬¼ì²éÊÇ·ñ¶ÔË÷ÒýÖÐÔÚkey_col֮ǰ·¢ÉúËùÓйؼü×ÖÔªËØʹÓÃÁËWHERE key_part_# = constant¡£ÔÚÕâÖÖÇé¿öÏ£¬MySQLΪÿ¸öMIN()»òMAX()±í´ïʽִÐÐÒ»´Î¹Ø¼ü×Ö²éÕÒ£¬²¢Óó£ÊýÌæ»»Ëü¡£Èç¹ûËùÓбí´ïʽÌ滻Ϊ³£Á¿£¬²éѯÁ¢¼´·µ»Ø¡£ÀýÈ磺
 
·                SELECT MIN(key_part2),MAX(key_part2)
·                    from tbl_name WHERE key_part1=10;
·         Èç¹û¶ÔÒ»¸ö¿ÉÓùؼü×ÖµÄ×î×óÃæµÄǰ׺½øÐÐÁËÅÅÐò»ò·Ö×é(ÀýÈ磬ORDER BY key_part_1,key_part_2)£¬ÅÅÐò»ò·Ö×éÒ»¸ö±í¡£Èç¹ûËùÓйؼü×ÖÔªËغóÃæÓÐDESC£¬¹Ø¼ü×ÖÒÔµ¹Ðò±»¶ÁÈ¡¡£
·         ÔÚһЩÇé¿öÖУ¬¿ÉÒÔ¶ÔÒ»¸ö²éѯ½øÐÐÓÅ»¯ÒԱ㲻ÓòéѯÊý¾ÝÐм´¿ÉÒÔ¼ìË÷Öµ¡£Èç¹û²éѯֻʹÓÃÀ´×Ôij¸ö±íµÄÊý×ÖÐͲ¢ÇÒ¹¹³ÉÄ


Ïà¹ØÎĵµ£º

linuxÏÂapache£¬php,mysqlÕûºÏtomcat

1.Ç°ÃæһƪÎÄÕÂÏêϸ½éÉÜÁËÈçºÎÔÚWindowsÏÂÕûºÏapache+mysql+php+tomcat,ºÜ¼òµ¥£¬µ«ÊÇÔÚLinuxϾÍûÕâôÈÝÒ×ÁË£¬ÐèÒªÊÖ¹¤µÄȥдÅäÖÃÎļþ£¬ÍøÉϵÄ×ÊÁÏÓкܶ࣬µ«ÊÇÎÒ¸ù¾ÝËûÃǵÄд·¨£¬Ò»²½Ò»²½µÄÅäÖû¹ÊÇûÄÜsuccess!£¨¿ÉÄÜÊÇÎÒ¸öÈ˵ÄÔ­Òò£¬²»¹ý£¬ÎÞÂÛÔÚGoogle»¹ÊÇbaiduËѵ½µÄÎÄÕ¾ÍÄÇô¼¸Æª£¬Õâ¸öתһÏ£¬ÄǸöתһÏ£¬×îºó¶¼² ......

¹ØÓÚÅ·Ã˾ÜÅú¼×¹ÇÎÄÊÕ¹ºMYSQL¡£¡£

   Ò»°ãÈË×ÜÊÇÒòΪĿ¹â¶Ìdz¶ø´íʧ׬Ǯ»ú»á£¬larry ÔÚÑ۹ⷽÃæ×ÜÄÜ¿´µÄ³¤Ô¶£¬ÒÔǰһϵÁеÄÊÕ¹º×ãÒÔÖ¤Ã÷¡£²»¹ýÕâ´Î¾Ü¾øÅ·ÃË»á¸øOracle´øÀ´ºÜ´óµÄÂé·³£¬Å·ÖÞÊг¡²»ÒªÁË£¿ ÎÒ²ÂÒ²Ðí»á´ò¹Ù˾¡£ Oracle¶ÔSAPÏòÀ´³ðÊÓ£¬Õâ´ÎSAPÀûÓÃÅ·ÃË´òÁËÒ»¸öƯÁÁµÄ·ü»÷Õ½£¬½ÓÏÂÀ´¾Í¿´OracleÔõô·´»÷ÁË£¬ÊÃÄ¿ÒÔ´ý¡£
   ......

ÀûÓÃmysqldumpµ¼³öµ¼ÈëmysqlËùÓÐÊý¾Ý¿â


1 µ¼³ö:
½øÈëÃüÁîÐÐ: Ö´ÐÐ
mysqldump -u username -p password –all-databases > all.sql
Ïêϸ²ÎÊý:
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
2 µ¼Èë
½øÈëmysql -u username -p password
Ö´ÐÐsource all.sql;
......

Mysql½ø»¯ÂÛ2


MysqlËùÖ§³ÖµÄÒýÇæÄ¿Ç°ÓÐÒÔϼ¸ÖÖ£º
MyISAM,InnoDB,MERGE,MEMORY(HEAR),BDB(BerkeleyDB),EXAMPLE,FEDERATED,ARCHIVE,CSV,BLACKHOLE.
ΪʲôҪÓÐÕâô¶àÒýÇ棿Ö÷ÒªÊÇMysqlÊÇÒ»¿î¼«ÎªÇ¿´óµÄÊý¾Ý¿â£¬ËüÊÊÓ¦ºÜ¶à²»Í¬µÄÔËÐл·¾³£¬ÎªÁËÂú×ã¸÷ÖÖ²»Í¬µÄÔËÐл·¾³Óë´æ´¢·½°¸µÄÐèÒª£¬ÕâЩËÑË÷ÒýÇæÒ²¾ÍÓ¦Ô˶øÉú£¨²»¹âÊÇΪÁËÅäºÏMysql ......

mysqlÎļþµ¼ÈëÂÒÂëÎÊÌâµÄ½â¾ö£º

mysqlÎļþµ¼ÈëÂÒÂëÎÊÌâµÄ½â¾ö£º
1 ÃüÁî²ì¿´×Ö·ûÉèÖá£
mysql> show   variables   like   "%char%";
2 ½«²»ÊÇutf-8µÄ¶¼¸Ä³Éutf8¡£Ö»ÓÐfilesystem²»±ä;
| Variable_name            | Value
   &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ