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

²é¿´mysqlµ±Ç°Á¬½ÓÊý

 1¡¢²é¿´µ±Ç°ËùÓÐÁ¬½ÓµÄÏêϸ×ÊÁÏ:
mysqladmin -uroot -proot processlist
D:\MySQL\bin>mysqladmin -uroot -proot processlist
+-----+------+----------------+---------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+----------------+---------+---------+------+-------+------------------+
| 591 | root | localhost:3544 | bbs | Sleep | 25 | | |
| 701 | root | localhost:3761 | | uery | 0 | | show processlist |
+-----+------+----------------+---------+---------+------+-------+------------------+
2¡¢Ö»²é¿´µ±Ç°Á¬½ÓÊý(Threads¾ÍÊÇÁ¬½ÓÊý.):
mysqladmin -uroot -proot status
D:\MySQL\bin>mysqladmin -uroot -proot status
Uptime: 2102 Threads: 3 Questions: 15531 Slow queries: 0 Opens: 0 Flush tab
les: 1 Open tables: 61 Queries per second avg: 7.389
3¡¢ÐÞ¸Ämysql×î´óÁ¬½ÓÊý£º
´ò¿ªmy.ini£¬ÐÞ¸Ämax_connections=100(ĬÈÏΪ100)¡£


Ïà¹ØÎĵµ£º

MySQLÐÔÄܼà¿ØС֪ʶ (ת)

 ÒýÓÃhttp://hi.baidu.com/mygf/blog/item/b9f55d60049a2ed58cb10d64.html
2009-10-24 00:23
Ò»£¬»ñÈ¡mysqlÓû§ÏµĽø³Ì×ÜÊý
ps -ef | awk '{print $1}' | grep "mysql" | grep -v "grep" | wc-1
¶þ£¬Ö÷»úÐÔÄÜ״̬
# uptime
[root@ ~]# uptime
13:05:52 up 53 days, 52 min, 1 user, l ......

MYSQl left joinÁªºÏ²éѯЧÂÊ·ÖÎö

user±í:
id | name
———
1 | libk
2 | zyfon
3 | daodao
user_action±í:
user_id | action
—————
1 | jump
1 | kick
1 | jump
2 | run
4 | swim
sql:
select id, name, action from user as u
left join user_action a on u.id = a.user_id
result:
id | ......

ÎÞ·¨ÔØÈë mysql À©Õ¹£¬Çë¼ì²é PHP ÅäÖá­¡­½â¾ö°ì·¨

PS:ÎÒ½ñÌìÅäÖà ·þÎñÆ÷µÄʱºò³öÏÖµÄÎÊÌâ¾ÍÊÇÕâ¸ö£¬µ«ÊÇÕÕ×Å·½·¨¶¼×öÁË£¬Ñ¾µÄ¡£¡£»¹ÊÇûÓ㬼«¶ÈÓôÃÆËÀ¡£¡£°¥¡£¡£¡£ÎÒÒ²²»ÖªµÀʲôԭÒòÄØ¡£¡£¿ÉÄܵÄÔ­Òò¶¼ÕÒ¹ýÁË¡£¡£ÓôÃÆ°¡`~
apache2+mysql+php5+phpmyadminÅäÖÃÎÊÌ⣺ÎÞ·¨¼ÓÈëmysqlÀ©Õ¹£¬Çë¼ì²éphpÅäÖÃ...
°²×°Íêapache2+mysql+php5ºó£¬°²×°phpmyadmin²¢ÅäÖúÃÒÔºó£¬ÔÚä¯À ......

mysqlÔöɾ¸Ä²é

 ²åÈëÒ»Ìõ¼Ç¼: 
          mysql> insert into table_name (column_name1,column_name2,.) values (value1,value2,..); 
¸üÐÂÒ»Ìõ¼Ç¼£º 
          mysql> update tbl_name 
s ......

ÎÒµÄMysqlÖØװʧ°Ü£¬½â¾ö°ì·¨

ÖØа²×°£¬³öÏÖ/etc/init.d/mysql: line 115: /etc/mysql/debian-start: ûÓиÃÎļþ»òĿ¼
invoke-rc.d: initscript mysql, action "start" failed.
ʹÓÃÃüÁsudo aptitude purge mysql-server mysql-server-5.0
È»ºóÔÚÖØа²×°....
apt-get install mysql-server-5.0 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ