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

mysqlµÄÖÐÎÄÂÒÂëÎÊÌâ

 Õâ¶Îʱ¼ä±»Õâ¸öÀ§ÈÅÁ˺ܾã¬Í¨¹ýÐÞ¸ÄÅäÖÃÎļþ£¬ÖÕÓÚ°ÑÕâ¸öÎÊÌâ½â¾öÁË¡£
×Ô¼ºÔÚÍøÉÏÒ²ÕÒÁ˺ܶà¹ØÓÚ½â¾öÕâ¸öÎÊÌâµÄ·½·¨£¬µ«ÊǶ¼½²µÄ²»Ì«Çå³þ£¬ËùÒÔ½ñÌìÔÚÕâÖØÐÂ˵ÏÂÕâ¸öÎÊÌâ¡£
ÎҵĽâ¾ö·½·¨ÊÇͨ¹ýÐÞ¸ÄmysqlµÄÅäÖÃÎļþmy.ini£¬·½·¨ÈçÏ£º
ÔÚmy.iniÖпÉÒÔ·¢ÏÖÓÐÕâôһ¶Î´úÂ룺
[client]
port=3306
[mysql]
default-character-set=latin1
default-character-set=latin1
Õâ¶Î´úÂëµÄÒâ˼ÊDZíʾÔÚmysql¿Í»§¶Ë£¨¼´mysqlµÄdos½çÃ棩ÖеÄ×Ö·û±àÂ룬¼´Îªlatin1(ISO-8859-1:µ¥×Ö½Ú±àÂ뷽ʽ),°Ñlatin1±àÂë¸ÄΪgbk£¨ÖÐÎıàÂëÀ©Õ¹¹ú¼Ò±ê×¼£¬¼æÈÝGB2312£¬¾ÍÊÇÖ»ÄÜÕý³£ÏÔʾÖÐÎĺÍÓ¢ÎÄ£©ºó£¬È»ºóÏȽ«mysql·þÎñÆ÷Í£Ö¹ºó£¬ÔÙÆô¶¯£¬ÔÚ¿Í»§¶ËÖоͿÉÒÔÊäÈëÖÐÎÄÁË¡£
# The default character set that will be used when a new schema or table is
# created and no character set is defined
default-character-set=utf8
default-character-set=utf8
Õâ¶Î´úÂëµÄÒâ˼ÊDZíʾmysql serverµÄ×Ö·û±àÂ룬utf8¿ÉÒÔ±£´æÈ«ÊÀ½ç¸÷¹úµÄÎÄ×Ö£¬Èç¹ûÄãµÄ³ÌÐòÏëÒªÖ§³Ö¹ú¼Ê»¯£¬µ×²ãµÄÊý¾Ý¿âÒ»¶¨Òª´æutf8±àÂ룬¾Í²»Òª¸ÄÁË¡£
ÕâÁ½ÕߵĹØϵ¿ÉÒÔÕâÑùÀí½â£ºutf8 <- gbk
µ±ÎÒÃÇÔÚ¿Í»§¶Ë(Æäʵ¾ÍÊÇmysqlµÄÒ»¸ödos½çÃæ)ÇÃgbkµÄʱºò£¬Ëü¿ÉÒ԰ѱàÂë×Ô¶¯×ª»»Îªutf8´¢´æ½øµ×²ãÊý¾Ý¿â¡£
½â¾öÁËÕâ¸öÎÊÌ⣬ÔÚÕâºÍ´ó¼Ò·ÖÏíÏÂ....
 
   
 
 


Ïà¹ØÎĵµ£º

Mysql ±í½á¹¹

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( ......

linux·þÎñÆ÷ÓÃlighttpd+mysql5+php5+SupeSite/X

Ò»¡¢°²×°ÏµÍ³»·¾³
1¡¢ÏµÍ³£ºcentos5
2¡¢²âÊÔÔÚvm5.5
×¼±¸Èí¼þ
lighttpd-1.4.18
ÏÂÔصØÖ·
mysql-5.0.41
part1ÏÂÔصØÖ·
part2ÏÂÔصØÖ·
part3ÏÂÔصØÖ·
php-5.2.3
ÏÂÔصØÖ·
SupeSite/X-Space
part1ÏÂÔصØÖ·
part2ÏÂÔصØÖ·
part3ÏÂÔصØÖ·
discuz
ÏÂÔصØÖ·
¶þ¡¢´î½¨web·þÎñÆ÷°²×°¹ý³Ì
1¡¢mysql5°²×°
$ tar zx ......

ͨ¹ý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%';  
+--------------- ......

MySQLʹÓü¼ÇÉÐĵÃ

 
2009Äê10ÔÂ30ÈÕ ÐÇÆÚÎå 22:53
ÓÃmysql
ÄÚÖú¯Êýת»»ipµØÖ·ºÍÊý×Ö
ÀûÓÃÁ½¸öÄÚÖú¯Êý
inet_aton:½«ipµØַת»»³ÉÊý×ÖÐÍ
inet_ntoa:½«Êý×ÖÐÍת»»³ÉipµØÖ·
³ä·ÖÀûÓÃmysqlÄÚÖõÄ
format
º¯Êý
ÓÈÆäÊÇÔÚ´¦Àí×Ö·û¸ñʽµÄʱºò,ÀýÈ罫12345ת»»³É12,345ÕâÑùµÄ,Ö»ÒªÓÃ:format(12345,0)¼´¿É,Èç¹ûÓÃformat(12345,2)ÔòÏÔÊ ......

mysqlµÄ×Ö·û´®º¯Êý

¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str) ·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql> select ASCII(2);
-> 50
mysql> select ASCII('dx');
-> 100
Ò² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ