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

mysqlά»¤³£ÓÃÃüÁî

Analyze Table
MySQL µÄOptimizer£¨ÓÅ»¯Ôª¼þ£©ÔÚÓÅ»¯SQLÓï¾äʱ£¬Ê×ÏÈÐèÒªÊÕ¼¯Ò»Ð©Ïà¹ØÐÅÏ¢£¬ÆäÖоͰüÀ¨±íµÄcardinality£¨¿ÉÒÔ·­ÒëΪ“É¢Áг̶Ȕ£©£¬Ëü±íʾij¸öË÷Òý¶ÔÓ¦µÄÁаüº¬¶àÉÙ¸ö²»Í¬µÄÖµ——Èç¹ûcardinality´ó´óÉÙÓÚÊý¾ÝµÄʵ¼ÊÉ¢Áг̶ȣ¬ÄÇôË÷Òý¾Í»ù±¾Ê§Ð§ÁË¡£
ÎÒÃÇ¿ÉÒÔʹÓÃSHOW INDEXÓï¾äÀ´²é¿´Ë÷ÒýµÄÉ¢Áг̶ȣº
SHOW INDEX from PLAYERS;
TABLE   KEY_NAME COLUMN_NAME CARDINALITY
------- -------- ----------- -----------
PLAYERS PRIMARY  PLAYERNO             14
ÒòΪ´ËʱPLAYER±íÖв»Í¬µÄPLAYERNOÊýÁ¿Ô¶Ô¶¶àÓÚ14£¬Ë÷Òý»ù±¾Ê§Ð§¡£
ÏÂÃæÎÒÃÇͨ¹ýAnalyze TableÓï¾äÀ´ÐÞ¸´Ë÷Òý£º
ANALYZE TABLE PLAYERS;
SHOW INDEX from PLAYERS;
½á¹ûÊÇ£º
TABLE   KEY_NAME COLUMN_NAME CARDINALITY
------- -------- ----------- -----------
PLAYERS PRIMARY  PLAYERNO           1000
´ËʱË÷ÒýÒѾ­ÐÞ¸´£¬²éѯЧÂÊ´ó´óÌá¸ß¡£
ÐèҪעÒâµÄÊÇ£¬Èç¹û¿ªÆôÁËbinlog£¬ÄÇôAnalyze TableµÄ½á¹ûÒ²»áдÈëbinlog£¬ÎÒÃÇ¿ÉÒÔÔÚanalyzeºÍtableÖ®¼äÌí¼Ó¹Ø¼ü×ÖlocalÈ¡ÏûдÈë¡£
Checksum Table
Êý¾ÝÔÚ´«Êäʱ£¬¿ÉÄܻᷢÉú±ä»¯£¬Ò²ÓпÉÄÜÒòΪÆäËüÔ­ÒòË𻵣¬ÎªÁ˱£Ö¤Êý¾ÝµÄÒ»Ö£¬ÎÒÃÇ¿ÉÒÔ¼ÆËãchecksum£¨Ð£ÑéÖµ£©¡£
ʹÓÃMyISAMÒýÇæµÄ±í»á°Ñchecksum´æ´¢ÆðÀ´£¬³ÆΪlive checksum£¬µ±Êý¾Ý·¢Éú±ä»¯Ê±£¬checksum»áÏàÓ¦±ä»¯¡£
ÔÚÖ´ÐÐChecksum Tableʱ£¬¿ÉÒÔÔÚ×îºóÖ¸¶¨Ñ¡Ïîqiuck»òÊÇextended£»qiuck±íʾ·µ»Ø´æ´¢µÄchecksumÖµ£¬¶øextended»áÖØмÆËãchecksum£¬Èç¹ûûÓÐÖ¸¶¨Ñ¡ÏÔòĬÈÏʹÓÃextended¡£
Optimize Table
¾­³£¸üÐÂÊý¾ÝµÄ´ÅÅÌÐèÒªÕûÀíËéƬ£¬Êý¾Ý¿âÒ²ÊÇÕâÑù£¬Optimize TableÓï¾ä¶ÔMyISAMºÍInnoDBÀàÐÍµÄ±í¶¼ÓÐЧ¡£
Èç¹û±í¾­³£¸üУ¬¾ÍÓ¦µ±¶¨ÆÚÔËÐÐOptimize TableÓï¾ä£¬±£Ö¤Ð§ÂÊ¡£
ÓëAnalyze TableÒ»Ñù£¬Optimize TableÒ²¿ÉÒÔʹÓÃlocalÀ´È¡ÏûдÈëbinlog¡£
Check Table
Êý¾Ý¿â¾­³£¿ÉÄÜÓöµ½´íÎó£¬Æ©ÈçÊý¾ÝдÈë´ÅÅÌʱ·¢Éú´íÎ󣬻òÊÇË


Ïà¹ØÎĵµ£º

MySQL 5.0´æ´¢¹ý³Ì

Ê×ÏÈ¿´MySQL 5.0²Î¿¼ÊÖ²áÖйØÓÚ´´½¨´æ´¢¹ý³ÌµÄÓ﷨˵Ã÷£º
 
CREATE
    [DEFINER = { user | CURRENT_USER }]
    PROCEDURE sp_name ([proc_parameter[,...]])
    [characteristic ...] routine_body
   
proc_parameter:
    ......

ÍêÃÀ¸ã¶¨phpMyAdmin¡°ÎÞ·¨ÔØÈëmysqlÀ©Õ¹¡±

°²×°Íêphpmyadmin
´ó¼Ò¾­³£³öÏÖµÄÎÊÌâ¾ÍÊDZ¨´í£º“ÎÞ·¨ÔØÈëmysqlÀ©Õ¹£¬Çë¼ì²éphpÅäÖÔ¡£
Èç¹ûÄãʹÓõÄÊÇphp5.2ÒÔÉϵİ汾£¬Çë×¢Ò⣺php¶Ô·þÎñµÄÀ©Õ¹¹¦ÄÜ×öÁËÒ»¶¨µÄ¸Ä¶¯£¬Ò²¾ÍÊÇ˵£¬Äã°²×°phpºÍÀ©Õ¹µÄ·½Ê½Ò²Òª×öµ÷ÕûÁË¡£
Ö÷ÒªµÄµ÷ÕûÓÐÁ½·½Ã棬һÊÇPHP5.2ÒÔÉϵİ汾ÖУ¬PHP.INIÎļþÎÞÐèÌí¼Óµ½WINDOWSĿ¼Ï¡£¶þ ......

ÖØÐÂÕÒµ½MySQLÊý¾Ý¿âµÄrootÃÜÂë

 Unix&Linux£º
1.ÓÃroot»òÕßÔËÐÐmysqldµÄÓû§µÇ¼ϵͳ£»
2£®ÀûÓÃkillÃüÁî½áÊøµômysqldµÄ½ø³Ì£»
3£®Ê¹ÓÃ--skip-grant-tables²ÎÊýÆô¶¯MySQL Server
shell>mysqld_safe --skip-grant-tables &
4.Ϊroot@localhostÉèÖÃÐÂÃÜÂë
shell>mysqladmin -u root flush-privileges password "newpassword" ......

MySQL ´æ´¢¹ý³Ì

£ÛתÔØ£ÝMySQL£ºMySQL ´´½¨´æ´¢¹ý³Ì£¨MySQL 5.0£©
2008-09-11 22:14
MySQL ´æ´¢¹ý³ÌÊÇ´Ó MySQL 5.0 ¿ªÊ¼Ôö¼ÓµÄй¦ÄÜ¡£´æ´¢¹ý³ÌµÄÓŵãÓÐÒ»Âá¿ð¡£²»¹ý×îÖ÷ÒªµÄ»¹ÊÇÖ´ÐÐЧÂʺÍSQL ´úÂë·â×°¡£ÌرðÊÇ SQL ´úÂë·â×°¹¦ÄÜ£¬Èç¹ûûÓд洢¹ý³Ì£¬ÔÚÍⲿ³ÌÐò·ÃÎÊÊý¾Ý¿âʱ£¨ÀýÈç PHP£©£¬Òª×éÖ¯ºÜ¶à SQL Óï¾ä¡£ÌرðÊÇÒµÎñÂß¼­¸´ÔÓµÄʱº ......

MySQL 5.1ÐÂÌØÐÔ֮ʼþµ÷¶ÈÆ÷(Event Scheduler)

À´×Ô£ºhttp://www.sofee.cn/blog/2007/07/18/91/
MySQL 5.1ÐÂÌØÐÔ֮ʼþµ÷¶ÈÆ÷(Event Scheduler)
CREATE-EVENT, cron, Event-Scheduler, ´¥·¢Æ÷, ¼Æ»®ÈÎÎñ, MySQL,Triggers, Ê¼þµ÷¶ÈÆ÷, ×÷Òµµ÷¶È
July 18, 2007 at 20:34:50 · Filed under MySQL
Ò»¡¢Ç°ÑÔ
×ÔMySQL5.1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ