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

MySQL³ÌÐòÆÊÎö£¨Profiling£©

ÎÒÃǽ«ÒªÏêϸµÄ½²µ½MySQLµÄÆÊÎö(Profiling),ÒòΪËüºÜÉÙÒÀÀµÓÚÄãµÄÓ¦Óá£Ó¦ÓúͷþÎñÆ÷¼¶±ðµÄÆÊÎöÓеÄʱºò¶¼ÊÇÓбØÒªµÄ¡£ËäȻӦÓü¶±ðµÄÆÊÎö¿ÉÒÔ¸øÄãÕû¸öÓ¦ÓÃÐÔÄܵÄ×ÜÀ¿¡££¬µ«ÊǶÔMySQLµÄÆÊÎöÌṩÁËÐÅÏ¢ÊÇ·þÎñÆ÷¼¶±ðËùÌṩ²»Á˵ġ£±ÈÈ磬¶ÔPHP´úÂë½øÐÐÆÊÎö²»»áÏÔʾMySQLÓжàÉÙÐÐÓï¾äÖ´ÐÐÁË¡£
 
ÓëÓ¦ÓÃÆÊÎöÒ»Ñù£¬Ä¿±êÊÇÕÒ³öMySQLÄIJ¿·ÖÏûºÄ¹ý¶àµÄʱ¼ä¡£ÎÒÃDz»»áÆÊÎöMySQLÔ´ÂëµÄ£¬ËäÈ»ÓеÄʱºò¶¨ÖÆ»¯MySQL°²×°ºÜÓÐÓ㬵«ÊÇÕâÊÇÁíÒ»±¾ÊéµÄÖ÷ÌâÁË¡£ËùÌæ´úµÄÊÇ£¬ÎÒÃǽ«½ÌÄãһЩ¿ÉÒÔ¼¼ÊõÀ´»ñÈ¡ºÍ·ÖÎö²»Í¬ÖÖÀàµÄMySQLÖ´ÐÐÓï¾äµÄÐÅÏ¢¡£
 
Äã¿ÉÒÔÓÃÔÚÈÎÒâµÄ¿ÅÁ£¼¶±ðÒÔÂú×ãÄãµÄÐèÇó£ºÄã¿ÉÄܶÔÕû¸ö·þÎñÆ÷½øÐÐÆÊÎö»òÕßµ¥¶À¼ì²éÒ»¸öÓï¾ä»òÕßÒ»×éÓï¾ä¡£ÏÂÁÐÐÅÏ¢Äã¿ÉÒÔÒ»µãµãµÄÊÕ¼¯£º
 
MySQL¾­³£·ÃÎʵÄÄÇЩÊý¾Ý
MySQL¾­³£Ö´ÐÐÓï¾äµÄÀàÐÍ
MySQLÏ̴߳󲿷Öʱ¼äµÄ״̬
MySQL¾­³£Ö´ÐÐÓï¾äµÄ×Óϵͳ
MySQLÖ´ÐÐÓï¾äËù·ÃÎʵÄÊý¾ÝÀàÐÍ
²»Í¬»î¶¯µÄÀàÐÍ£¬±ÈÈçɨÃèË÷Òý¡£
ÎÒÃÇÏÈ´Ó·¶Î§×î¹ãµÄÆÊÎö¿ªÊ¼£¬ÄǾÍÊÇ·þÎñÆ÷ÆÊÎö£¬½«½ÌÄã¸ü¶àϸ½Ú¡£
¼Ç¼ִÐеÄÓï¾ä
MySQLÓÐÁ½ÖּǼÓï¾äµÄÀàÐÍ£ºgeneral logºÍslow log¡£ËûÃǶ¼ÊǼǼִÐÐÓï¾ä£¬µ«ÊÇÈ´ÔÚÓï¾äÖ´Ðнø³ÌµÄÁ½¶Ë¡£general log¼Ç¼ÁËÿ¸ö·þÎñÆ÷ÊÕµ½µÄÓï¾ä£¬Òò´ËËüµÄÓï¾ä¿ÉÄÜ°üº¬ÁËÄÇЩûÓÐÖ´Ðе¼Ö´íÎóµÄÓï¾ä¡£general Log¼Ç¼ÁËËùÓеÄÓï¾ä£¬°üÀ¨ÁËһЩ·ÇÖ´ÐÐÓï¾äµÄʼþ£¬±ÈÈçÁ¬½ÓºÍ¶Ï¿ªÁ¬½Ó¡£Äã¿ÉÒÔÓÃÒ»¸öÖ¸ÁîÀ´ÆôÓÃËü¡£
log = <file_name>
 
¸ù¾ÝÉè¼Æ£¬general log²»»á°üÀ¨Ö´ÐÐʱ¼äºÍÆäËûһЩ½ö½öÔÚÓï¾äÖ´ÐÐÍê±ÏµÄÐÅÏ¢¡£Ïà±È½Ï¶øÑÔ£¬slow log¼Ç¼ִÐÐÍê±ÏµÄÓï¾ä¡£ÓÈÆäÊÇ£¬Ëü¼Ç¼ÄÇЩ³¬¹ýÖ¸¶¨Ê±¼äÖ´ÐеÄÓï¾ä¡£ÕâÁ½ÖÖÈÕÖ¾¶¼¶Ô³ÌÐòÆÊÎöºÜÓÐÓ㬵«ÊÇslow logÊÇ»ñÈ¡ÎÊÌâÓï¾äµÄÖ÷Òª¹¤¾ß¡£ÎÒÃdz£³£ÍƼö°ÑËü¿ªÆô¡£
 
ÏÂÃæÁгöµÄÅäÖûῪÆôÕâ¸öÈÕÖ¾¡£»ñÈ¡ËùÓÐÖ´ÐÐʱ¼ä³¬¹ý2sµÄÓï¾ä£¬ÒÔ¼°¼Ç¼ÄÇЩ²»Ê¹ÓÃË÷ÒýµÄÓï¾ä¡£ËüÒ²»á¼Ç¼һЩִÐÐÂýµÄ¹ÜÀíÓï¾ä£¬±ÈÈçOPTIMIZE TABLE:
 
 
log-slow-queries              = <file_name>
long_query_time               = 2
log-queries-not-using-indexes
log-slow-admin-statements
 
Äã¿ÉÒÔ×Ô¶¨ÒåÕâЩÅäÖã¬È»ºó°ÑËüÃǷŵ½my.confÎļþÖС£¸ü¶àµÄ·þÎñÆ÷ÅäÖý«ÔÚÒÔºóµÄÕ½ÚÏêϸ½²Êö¡£
 
long_query_timeµÄĬÈÏÖµÊÇ10s¡£Õâ¸öÉèÖÃÌ«Â


Ïà¹ØÎĵµ£º

mysqlÌí¼ÓÓû§

mysqlÌí¼ÓÓû§·½·¨ 
½¨Á¢Êý¾Ý¿âgamesp
create database gamesp;
Ìí
¼ÓÓû§
grant  all  on  Êý¾Ý¿âÃû.*   to   Óû§
Ãû
@localhost  identified  by  'ÃÜÂë';
grant all on gamesp.* to
newuser@localhost
identified by
'pas ......

hibernate mysql ´æ´¢¶þ½øÖÆÎļþÎÊÌâ×ܽá

ÏÈ˵Ã÷Ò»ÏÂBlobµÄÀàÐÍ£¬Ö±½Ó´ÓÍøÉÏÕª³­ÁË£¡£¡£¡
1¡¢MySQLÓÐËÄÖÖBLOBÀàÐÍ:
¡¡¡¡·tinyblob:½ö255¸ö×Ö·û
¡¡¡¡·blob:×î´óÏÞÖƵ½65K×Ö½Ú
¡¡¡¡·mediumblob:ÏÞÖƵ½16M×Ö½Ú
¡¡¡¡·longblob:¿É´ï4GB
2¡¢³ýÁËÀàÐͶԺóÃæ´æÈ¡Îļþ´óСÓÐÏÞÖÆ£¬»¹ÒªÐÞ¸ÄmysqlµÄÅäÖÃÎļþ¡£
¡¡¡¡Windows¡¢linux»ù±¾Ò»Ñù ......

MySQL×Ö·û´®º¯ÊýµÄÓ¦ÓÃÓë×¢ÒâÊÂÏî

MySQL×Ö·û´®º¯ÊýµÄÓ¦ÓÃÓë×¢ÒâÊÂÏî
 
ÒÔϵÄÎÄÕÂÖ÷ÒªÏò´ó¼ÒÃèÊöµÄÊÇMySQL×Ö·û´®º¯ÊýµÄʵ¼ÊÓ¦ÓÃÓëÆäʵ¼Ê²Ù×÷´úÂëµÄÃèÊö£¬Í¬Ê±±¾ÎÄ»¹¶ÔÆäÔÚʵ¼ÊÓ¦ÓÃÖУ¬Ò»Ð©ÖµµÃÎÒÃÇ´ó¼Ò×¢ÒâµÄÏà¹ØÊÂÏîµÄÃèÊö£¬ÒÔϾÍÊÇÎÄÕµÄÖ÷ÒªÄÚÈÝÃèÊö£¬ÍûÄã»áÓÐËùÊÕ»ñ¡£
 
CHARSET(str)  ·µ»Ø×Ö´®×Ö·û¼¯
 
CONCAT (string2 [,& ......

mysql noinstall°æ°²×°

mysql noinstall°æ°²×°
1¡¢Èí¼þµÄÏÂÔØ
¡¡¡¡µ½mysqlµÄ¹Ù·½ÍøÕ¾ÏÂÔØMySQLµÄ½âѹ°ü£¬Èçmysql-noinstall-5.0.51b-win32.zip
¡¡¡¡È»ºó½«Æä½âѹµ½ÄãÏ£ÍûÊý¾Ý¿âËùÔÚµÄij¸öλÖã¬ÈçC:\
¡¡¡¡ÕâÑùÔÚC:ÅÌÏÂÃæ¾ÍÓÐÁËC:\mysql-5.0.51b-win32ÕâÑùµÄÒ»¸öĿ¼£¬ÀïÃæ¾ÍÊÇMySQLÊý¾Ý¿âµÄÈ«²¿ÄÚÈÝ¡£
2¡¢ÅäÖÃ
¡¡¡¡Ê×ÏÈÎÒÃÇÀ´¿´MySQLµÄ¸ùÄ¿Â ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ