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

mysql 1366´íÎ󣬱£´æÖÐÎĵķ½·¨

³õѧmysqlÎÒÒ²Åöµ½ÖÐÎÄ´æ´¢µÄÎÊÌ⣬ÒÔÏÂÊÇÎҵĽâ¾ö·½°¸£º
 1.Ê×ÏÈÔÚ×Ö¶ÎÑ¡Ïîcolumn option Öн«×Ö¶Î×Ö·û¼¯column charsetÉèΪgb2312¡£
 2.»¹ÐèÒªÔÚ±íÑ¡Ïîtable option ÖÐͬÑù½«charsetÉèÖÃΪgb2312.
 3.×îºóÈç¹û»¹²»ÐУ¬¾ÍÔÚmysql°²×°Ä¿Â¼ÏÂÕÒµ½my.ini,ÕÒµ½ÒÔÏÂλÖãº
 [mysql]
 default-character-set=gb2312
 Í¬Ñù½«character-setÉèΪgb2312.
¾­¹ýÒÔÉÏÉèÖþͿÉÒÔÔÚmysqlÖб£´æÖÐÎÄÁË¡£ 


Ïà¹ØÎĵµ£º

mysql µ¼Èë¡¢µ¼³öÊý¾Ý¿â¡¢±í

mysql µ¼³ö±í£º
mysqldump -u Óû§Ãû -p  --opt  Êý¾Ý¿âÓû§Ãû ±íÃû
> ±íÃû.sql
mysql µ¼³öÊý¾Ý¿â£º
mysqldump -u
Óû§Ãû -p  --opt  Êý¾Ý¿âÓû§Ãû
>
Êý¾Ý¿â
Ãû.sql
mysql µ¼Èë±í£º
>source e:\base\pet.sql;
mysql µ¼Èë±íÊý¾Ý£º
>LOAD DATA LOCAL INFILE 'e:path/pet.txt ......

ÓÅ»¯MYSQLÊý¾Ý¿âµÄ·½·¨

1¡¢Ñ¡È¡×îÊÊÓõÄ×Ö¶ÎÊôÐÔ
¡¡¡¡MySQL¿ÉÒԺܺõÄÖ§³Ö´óÊý¾ÝÁ¿µÄ´æÈ¡£¬µ«ÊÇÒ»°ã˵À´£¬Êý¾Ý¿âÖеıíԽС£¬ÔÚËüÉÏÃæÖ´ÐеIJéѯҲ¾Í»áÔ½¿ì¡£Òò´Ë£¬ÔÚ´´½¨±íµÄʱºò£¬ÎªÁË»ñµÃ¸üºÃµÄÐÔÄÜ£¬ÎÒÃÇ¿ÉÒÔ½«±íÖÐ×ֶεĿí¶ÈÉèµÃ¾¡¿ÉÄÜС¡£ÀýÈ磬ÔÚ¶¨ÒåÓÊÕþ±àÂëÕâ¸ö×Ö¶Îʱ£¬Èç¹û½«ÆäÉèÖÃΪCHAR(255),ÏÔÈ»¸øÊý¾Ý¿âÔö¼ÓÁ˲»±ØÒªµÄ¿Õ¼ä£¬ÉõÖÁʹ ......

mySql Îı¾×ֶ㤶È

BLOB
TEXT
Ò»¸öBLOB»òTEXTÁУ¬×î´ó³¤¶ÈΪ65535(2^16-1)¸ö×Ö·û¡£
MEDIUMBLOB
MEDIUMTEXT
Ò»¸öBLOB»òTEXTÁУ¬×î´ó³¤¶ÈΪ16777215(2^24-1)¸ö×Ö·û¡£
LONGBLOB
LONGTEXT
Ò»¸öBLOB»òTEXTÁУ¬×î´ó³¤¶ÈΪ4294967295(2^32-1)¸ö×Ö·û¡£
¿Éͨ¹ýÐÞ¸Äphp.iniÎļþ£¬¸Ä±ä×î´ó³¤¶ÈÉèÖá£
; Valid range 0 - 2147483647.  ......

mysql Ð޸ıí½á¹¹

1. mysql Ð޸ıíÃû×Ö
    ALTER TABLE t1 RENAME t2;
2. ÐÞ¸ÄÁеÄÃû×Ö
    >ALTER TABLE stock CHANGE COLUMN stock_id id INT(6);
3. Ôö¼ÓÁÐ
    >ALTER TABLE ab ADD COLUMN id INT(3);
4. ¼õÉÙÁÐ
   >ALTER TABLE ab DROP COLUMN id;
5. ÐÞ¸ÄÁ ......

¹ØÓÚMySQLÊý¾ÝÁ¿Ôö¼Ó±ä»¯²»´óʱ£¬Ò»ÖÖ·ÖÒ³µÄÓÅ»¯·½°¸

¹ØÓÚ·ÖÒ³µÄÓÅ»¯¡£
ÎÒÃÇÖªµÀ£¬ÔÚMySQLÖзÖÒ³ºÜ¼òµ¥£¬Ö±½ÓLIMIT page_no,page_total ¾Í¿ÉÒÔÁË¡£
¿ÉÊǵ±¼Ç¼ÊýÂýÂýÔö´óʱ£¬Ëý¾Í²»ÄÇôºÃʹÁË¡£
ÕâÀïÎÒÃÇ´´½¨ÕªÒª±íÀ´¼Ç¼ҳÂëºÍÔ­±íÖ®¼äµÄ¹ØÁª¡£
ÏÂÃæΪ²âÊÔÊý¾Ý¡£
Ô­±í£º
CREATE TABLE `t_group` (
  `id` int(11) NOT NULL auto_increment,
  `money` decim ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ