Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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·Ö²¼ÊÂÎñµÄ̽Ë÷

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

mysql£ºÍò¶ñµÄÂÒÂëÖ®whenÓï¾äÖвúÉúµÄÂÒÂë

ʹÓÃmysqlÓÖÓöµ½ÎÊÌâÁË£¬Õâ´ÎÊǹØÓÚÂÒÂëµÄ...
ÆäʵÎÒÒ²±È½ÏÁ˽â±àÂëµÄÎÊÌ⣬Ҳ֪µÀÂÒÂë²úÉúµÄÔ­Àí£¬¶øÇÒÍøÉ϶ÔmysqlµÄÂÒÂëÎÊÌâÒ²ÓбȽ϶àµÄ½â´ð£¬
µ«ÊǽñÌìÎÒÓöµ½µÄÕâ¸öÂÒÂëÈ´±È½ÏÆæ¹Ö,ÔÚwhenÓï¾äÖвúÉúÁËÆæ¹ÖµÄÂÒÂë¡£
create table my_table(id int, name varchar(50), born DateTime);
insert into my_table val ......

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   ¾¹È»ÓÐÁ½¸öÊýÁ ......

linuxϲ鿴nginx£¬apache£¬mysql£¬phpµÄ±àÒë²ÎÊý

ÓÐʱºònginx£¬apache£¬mysql£¬php±àÒëÍêÁËÏë¿´¿´±àÒë²ÎÊý¿ÉÒÔÓÃÒÔÏ·½·¨
nginx±àÒë²ÎÊý£º
#/usr/local/nginx/sbin/nginx -V
CODE:
nginx version: nginx/0.6.32
built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42)
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_mo ......

ÓйØÓÚMysqlµÄMERGE±íÀàÐÍ

 Ëû½«¶à¸ö±íÔÚÂß¼­Éϵ±×÷Ò»¸ö±íÀ´²éѯ¡£Ëû½¨Á¢ºóÓÐÁ½¸öÎļþ£¬
¡¡¡¡.frm ±í½á¹¹¶¨Òå
¡¡¡¡.mrg union±íµÄÃû×ÖÇåµ¥
¡¡¡¡Á½¸ö»ù±¾±í:
¡¡¡¡CREATE TABLE TEST_MERGE_1(
¡¡¡¡ID INT(5) NOT NULL,
¡¡¡¡VALUE VARCHAR(100) NOT NULL,
¡¡¡¡PRIMARY KEY(ID)
¡¡¡¡)
¡¡¡¡CREATE TABLE TEST_MERGE_2(
¡¡¡¡ID INT(5) NOT N ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ