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

ͨ¹ýshow status À´ÓÅ»¯MySQLÊý¾Ý¿â

 
2009Äê10ÔÂ30ÈÕ ÐÇÆÚÎå 22:53
1, ²é¿´MySQL
·þÎñÆ÷ÅäÖÃÐÅÏ¢
mysql> show variables;
mysql> show variables;
2, ²é¿´MySQL·þÎñÆ÷ÔËÐеĸ÷ÖÖ״ֵ̬
mysql> show global status;
mysql> show global status;
3, Âý²éѯ
mysql> show variables like '%slow%';  
+------------------+-------+  
| Variable_name    | Value |  
+------------------+-------+  
| log_slow_queries | OFF   |  
| slow_launch_time | 2     |  
+------------------+-------+  
mysql> show global status like '%slow%';  
+---------------------+-------+  
| Variable_name       | Value |  
+---------------------+-------+  
| Slow_launch_threads | 0     |  
| Slow_queries        | 279   |  
+---------------------+-------+
mysql> show variables like '%slow%';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| log_slow_queries | OFF   |
| slow_launch_time | 2     |
+------------------+-------+
mysql> show global status like '%slow%';
+---------------------+-------+
| Variable_name       | Value |
+---------------------+-------+
| Slow_launch_threads | 0     |
| Slow_queries        | 279   |
+---------------------+-------+
ÅäÖÃÖйرÕÁ˼ǼÂý²éѯ£¨×îºÃÊÇ´ò¿ª£¬·½±ãÓÅ»¯
£©£¬³¬¹ý2Ã뼴ΪÂý²éѯ£¬Ò»¹²ÓÐ279ÌõÂý²éѯ
4, Á¬½ÓÊý
mysql> show variables like 'max_connections';  
+-----------------+-------+  
| Variable_name   | Value |  
+-----------------+-------+  
| max_connections | 500   |  
+-----------------+-------+  
mys


Ïà¹ØÎĵµ£º

MySQL 5.0°²×°Í¼½â

ÏÂÃæµÄÊÇMySQL°²×°µÄͼ½â:¡¡¡¡
Ë«»÷ÔËÐГsetup.exe”£¬³öÏÖÈçϽçÃ棺 
mysql°²×°Ïòµ¼Æô¶¯£¬°´“Next”¼ÌÐø
Ñ¡Ôñ°²×°ÀàÐÍ£¬ÓГTypical£¨Ä¬ÈÏ£©”¡¢“Complete£¨ÍêÈ«£©”¡¢“Custom£¨Óû§×Ô¶¨Ò壩”Èý¸öÑ¡ÏÎÒÃÇÑ¡Ôñ“Custom”£¬Óиü¶àµÄÑ¡ÏҲ· ......

Mysql·Ö²¼ÊÂÎñµÄ̽Ë÷

ÓÉÓÚÏîÄ¿ÐèÒª,¶Ômysql·Ö²¼ÊÂÎñÓÐÒ»¶¨ÒªÇó.ÕâÀïÏȼòµ¥ËµÃ÷±ØÒª.
¼ÙÉè,ÈÕ³£²ÆÎñÖÐ,ÒªÍê³ÉÒ»¸öÓµ»¤¶©¹º,±ØÐ뽫¶¨µ¥²Ù×÷ºÍ²ÆÎñ²Ù×÷·âÔÚÒ»¸öÊÂÎñÖвÅÄܱ£Ö¤½»Ò×ÍêÕûÐÔ.
Èç¹û¶¨µ¥ºÍ²ÆÎñÊý¾Ý¶¼·Ö²¼ÔÚ¸÷×ÔµÄʵÀýÖÐ,Ôò±ØÐëÓ÷ֲ¼ÊÂÎñ²ÅÄÜÂú×ã.
·Ï»°²»¶à£¬½øÈë·Ö²¼ÊÂÎñ̽Ë÷¡£
(±¾ÎÄÀý×ÓÀ´×ÔÍøÂ磬±¾ÎÄÖ»×¢ÖØ̽Ë÷£©
1.ÔÚ±¾»ú loca ......

MySQLµÄmy.cnfÓÅ»¯ÊµÀý

http://linux.chinaitlab.com/MYSQL/524755_2.html
http://bbs.chinaunix.net/archiver/?tid-809159.html
 ÔÚApache, PHP,
MySQLµÄÌåϵ¼Ü¹¹ÖУ¬MySQL¶ÔÓÚÐÔÄܵÄÓ°Ïì×î´ó£¬Ò²ÊǹؼüµÄºËÐIJ¿·Ö¡£¶ÔÓÚDiscuz!ÂÛ̳³ÌÐòÒ²ÊÇÈç´Ë£¬MySQLµÄÉèÖÃÊÇ·ñºÏÀíÓÅ»¯£¬Ö±½Ó
Ó°Ïìµ½ÂÛ̳µÄËٶȺͳÐÔØÁ¿£¡Í¬Ê±£¬MySQLÒ²ÊÇÓÅ»¯ÄѶÈ×î´ó ......

MySQLµÄ²éѯÓÅ»¯ºÜɵ

select id from message where author_id in (select followed_id from Relation where follower_id=1) order by id desc   ºÍ ·Ö±ðÖ´ÐÐ $userlist = select followed_id from Relation where follower_id=1 ÔÙ select id from message where author_id in ($userlist) order by id desc   ¾¹È»ÓÐÁ½¸öÊýÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ