ͨ¹ý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µÄÂÒÂëÎÊÌâÒ²ÓбȽ϶àµÄ½â´ð£¬
µ«ÊǽñÌìÎÒÓöµ½µÄÕâ¸öÂÒÂëÈ´±È½ÏÆæ¹Ö,ÔÚwhenÓï¾äÖвúÉúÁËÆæ¹ÖµÄÂÒÂë¡£
create table my_table(id int, name varchar(50), born DateTime);
insert into my_table val ......
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 ¾¹È»ÓÐÁ½¸öÊýÁ ......
MYSQLÖÐÐ޸ıí½á¹¹ALTERÓ÷¨
ALTER TABLE Result ADD xinlinDoc longblob;
ALTER TABLE Result ADD xinlinDocName varchar(50);
ÆäËüʵÀý£º
CREATE TABLE t1(a INTEGER,b CHAR(10)); // ´´½¨µÄ±ít1¿ªÊ¼
ALTER TABLE t1 RENAME t2; // ÖØÃüÃû±í£¬´Ót1µ½t2
ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE b c CHAR( ......
ÓÐ2¸ö²»Í¬µÄ·½·¨Ôö¼ÓÓû§£ºÍ¨¹ýʹÓÃGRANTÓï¾ä»òͨ¹ýÖ±½Ó²Ù×÷MySQLÊÚȨ±í¡£±È½ÏºÃµÄ·½·¨ÊÇʹÓÃGRANTÓï¾ä£¬ÒòΪËûÃÇÊǸü¼òÃ÷²¢ÇÒºÃÏñ´íÎóÉÙЩ¡£
ÏÂÃæµÄÀý×ÓÏÔʾ³öÈçºÎʹÓÃMySQL¿Í»§°²×°ÐÂÓû§¡£ÕâЩÀý×Ó¼Ù¶¨È¨ÏÞÒÑȱʡ±»°²×°¡£ÕâÒâζ
×ÅΪÁ˸ı䣬Äã±ØÐëÔÚMySQLÕýÔÚÔËÐÐͬһ̨»úÆ÷ÉÏ£¬Äã±ØÐë×÷ΪMySQL
ro ......