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

ÈçºÎÖØÆôMySQL·þÎñ

 RedHat Linux (Fedora Core/Cent OS)
1.Æô¶¯£º/etc/init.d/mysqld start
2.Í£Ö¹£º/etc/init.d/mysqld stop
3.ÖØÆô£º/etc/init.d/mysqld restart
Debian / Ubuntu Linux
1.Æô¶¯£º/etc/init.d/mysql start
2.Í£Ö¹£º/etc/init.d/mysql stop
3.ÖØÆô£º/etc/init.d/mysql restart
Windows
1.µã»÷“¿ªÊ¼”->“ÔËÐД£¨¿ì½Ý¼üWin+R£©
2.Æô¶¯£ºÊäÈë net stop mysql
3.Í£Ö¹£ºÊäÈë net start mysql
Ìáʾ
Redhat Linux Ò²Ö§³Öservice command£¬
Æô¶¯£º# service mysqld start
Í£Ö¹£º# service mysqld stop
ÖØÆô£º# service mysqld restart
Windowsϲ»ÄÜÖ±½ÓÖØÆô(restart)£¬Ö»ÄÜÏÈÍ£Ö¹£¬ÔÙÆô¶¯¡£


Ïà¹ØÎĵµ£º

LinuxÏ·ÖÎöMysqlÈÕÖ¾µÄºÃ¹¤¾ß–mysqlsla


´Óhttp://hackmysql.com/mysqlslaÏÂÔØmysqlsla£¬µ±Ç°×îаæΪ£º2.03
tar zxvf mysqlsla-2.03.tar.gz
cp mysqlsla-2.03/bin/mysqlsla /usr/local/bin
Èç¹ûÌáʾ“Can’t locate DBI.pm”£¬Ö´ÐÐÒÔÏÂÃüÁî
yum install perl-DBI perl-DBD-MySQL -y
Õâʱ¾Í¿ÉÒÔʹÓÃmysqlslaÁË£¬Ó÷¨ÈçÏÂ
mysqlsla -lt slo ......

MySQLÊý¾Ý¿âµÄ¼òµ¥²Ù×÷

MySQLÊý¾Ý¿âµÄ¼òµ¥²Ù×÷
Ò».´´½¨Êý¾Ý¿â ͨ¹ýshow databases;ÃüÁîÏÔʾËùÓÐÒÑ´´½¨µÄÊý¾Ý¿âµÄÃû³Æ¡£
ͨ¹ýcreate database XXX;´´½¨Êý¾Ý¿âÃûΪXXXµÄÊý¾Ý¿â¡£ ÀýÈ磺mysql>create database test;     ¶þ.´´½¨±íµ¥ ͨ¹ýcreate table XXX();´´½¨ ÀýÈç: È»ºó¿ÉÒÔͨ¹ýdescÃüÁî²é¿´±íµ¥: ÀýÈç: Èý ......

mysqlË÷ÒýµÄÒ»¸ö¼¼ÇÉ

Õë¶Ôselect * from table where col1 > number order by col2 desc¡£
Æäʵ°´ÕÕ³£¹æµÄ·½·¨¿ÉÒÔÕâÑùÉè¼Æ£ºkey(col1, col2)
µ«ÊÇÕâÖÖ°ì·¨ÔÚmysqlÀï²»ËãÊÇÀíÏëµÄ£¬whereÌõ¼þÀïÏÞ¶¨Ë÷ÒýÇ°²¿·ÖÊÇÒ»¸ö·¶Î§µÄÇé¿öϺóÃæµÄorder by»¹ÊÇ»áÓÐfilesort¡£Èç¹ûwhereÌõ¼þÀïÏÞ¶¨Ë÷ÒýÇ°²¿·ÖÊÇÒ»¸ö³£Á¿£¬ÄÇôorder by¾Í»áÓÐЧÀûÓÃË÷Òý¡£À ......

MySQLÀィÁ¢Ë÷ÒýÓ¦¸Ã¿¼ÂÇÊý¾Ý¿âÒýÇæµÄÀàÐÍ

 Ç°Ò»Ö±Ã»×¢ÒâÕâÒ»µã£¬Í»È»Ò»ÉÁÄîÏëÆðÀ´£¬ÏÂÃæßëß룺
±È·½ËµÓÐÒ»¸öÎÄÕÂ±í£¬ÎÒÃÇҪʵÏÖij¸öÀà±ðÏ°´Ê±¼äµ¹ÐòÁбíÏÔʾ¹¦ÄÜ£º
SELECT * from articles WHERE category_id = … ORDER BY created DESC LIMIT …
ÕâÑùµÄ²éѯºÜ³£¼û£¬»ù±¾Éϲ»¹ÜʲôӦÓÃÀﶼÄÜÕÒ³öÒ»´ó°ÑÀàËƵÄSQLÀ´£¬Ñ§ÔºÅɵĶÁÕß¿´µ½ÉÏÃæµÄS ......

mysql Ò»µÀСÌâ

 ±íÃûΪtableµÄ±íÄÚÈÝÈçÏÂ
Year month value
2009  1    1.1
2009  2    1.2
2009  3    1.3
2009  4    1.4
2010  1    2.1
2010  2    2.2
2010  3  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ