MYSQLµÄ×Ö·û¼¯——×Ö·û¼¯ºÍУ¶Ô¹æÔò
1.ʲô½Ð×ö×Ö·û¼¯
×Ö·û¼¯¾ÍÊÇÒ»Ì×·ûºÅºÍ×Ö·û±àÂëµÄ¼¯ºÏ¡£
2.ʲô½Ð×öУ¶Ô¹æÔò
У¶Ô¹æÔò¾ÍÊÇÔÚ×Ö·û¼¯ÄÚÓÃÓڱȽÏ×Ö·ûµÄÒ»Ì×¹æÔò¡£
MYSQL5.1Êý¾Ý¿â¿ÉÒÔ×öµ½
· ʹÓöàÖÖ×Ö·û¼¯À´´æ´¢×Ö·û´®
· ʹÓöàÖÖУ¶Ô¹æÔòÀ´±È½Ï×Ö·û´®
· ÔÚͬһ̨·þÎñÆ÷¡¢Í¬Ò»¸öÊý¾Ý¿â»òÉõÖÁÔÚͬһ¸ö±íÖÐʹÓò»Í¬×Ö·û¼¯»òУ¶Ô¹æÔòÀ´»ìºÏ×Ö·û´®
· ÔÊÐí¶¨ÒåÈκ춱ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò
MYSQLÄܶ¨ÒåÏÂÃæ4ÖÖ¼¶±ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò£º
1.·þÎñÆ÷¼¶±ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£ºmysqld --default-character-set=latin1 --default-collation=latin1_swedish_ci
2.Êý¾Ý¿â¼¶±ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£º½¨Á¢¿âʱ£ºCREATE DATABASE db_name DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
Ð޸Ŀâʱ£ºALTER DATABASE db_name DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
3.±í¼¶±ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£º
½¨±í£ºCREATE TABLE tbl_name (column_list) [DEFAULT CHARACTER SET charset_name [COLLATE collation_name]]
¸Ä±í£ºALTER TABLE tbl_name [DEFAULT CHARACTER SET charset_name] [COLLATE collation_name]
4.Á춱ðµÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£ºcol_name {CHAR | VARCHAR | TEXT} (col_length) [CHARACTER SET charset_name [COLLATE collation_name]]
Á¬½Ó×Ö·û¼¯ºÍУ¶Ô¹æÔò
Õû¸öÁ¬½Ó¹ý³Ì°üÀ¨2¸ö½×¶Î£¬¿Í»§¶Ë·¢ËÍÇëÇ󣬷þÎñÆ÷¶ËÏìÓ¦ÇëÇó¡£ÆäÖÐÉæ¼°ÁË3ÖÖÁ¬½Ó¹ý³ÌÖеÄ×Ö·û¼¯ºÍУ¶Ô¹æÔò£º
1.µ±´Ó¿Í»§¶Ë·¢Ë͸ø·þÎñÆ÷¶ËµÄÇëÇóÊôÓÚÄÄÖÖ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£ºSET character_set_client = x;
2.·þÎñ¶ËÊÕµ½ÇëÇóºó£¬Ó¦¸Ã½«ÇëÇóת»»ÎªÄÄÖÖ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£ºSET character_set_results = x;
3.·þÎñ¶Ë·¢Ëͽá¹û¼¯»òÕß´íÎóÐÅÏ¢¸ø¿Í»§¶ËÓÃÄÄÖÖ×Ö·û¼¯ºÍУ¶Ô¹æÔò
ÉèÖ÷½·¨£ºSET character_set_connection = x;
×ÛºÏÉèÖ÷½Ê½£ºSET NAMES 'x'
Õâ¸öÓï¾äµÈ¼ÛÓÚÉÏÃæ3ÌõÓï¾äµÄ¼¯ºÏ£¬Ò²¾ÍÊÇ3ÖÐÇé¿ö¶¼Ê¹ÓÃÏàͬµÄ×Ö·û¼¯µÄʱºò£¬¿ÉÒÔÓÃÕâÒ»¾ä´úÌæÉÏÃæ3¾ä¡£
ÕâÑù´ó¼ÒÓ¦¸Ã¶Ô×Ö·û¼¯ºÍУ¶Ô¹æÔòÓÐЩÁ˽âÁË°É¡£
ÎÒÀ´½âÊÍһϴó¼ÒΪʲô»á³öÏÖÂÒÂëµÄÎÊÌâ¡£ÆäʵҲ¾ÍÊÇ3¸öÁ¬½Ó¹ý³ÌÖеÄ×Ö·û¼¯ºÍУ¶Ô¹æÔòÉ趨²»Æ¥Åä¡£
ÀýÈ磺Êý¾Ý¿â¶¨ÒåµÄ×Ö·û¼¯ÎªGB2312£¬¿ÉÊÇÒ³ÃæÒªÇóÏÔʾutf-8µÄ£¬ÄÇô¹âÅäÖÃSET NAMES 'utf8'ÊDz»Äܽâ¾öÎÊÌâµÄ¡£Ê×ÏÈ´Ó
Ïà¹ØÎĵµ£º
mysqlÓÅ»¯£º ÄÚ´æ±íºÍÁÙʱ±í
2009Äê02ÔÂ01ÈÕ ÐÇÆÚÈÕ 10:41
ÓÉÓÚÖ±½ÓʹÓÃÁÙʱ±íÀ´´´½¨Öмä±í£¬ÆäËٶȲ»ÈçÈËÒ⣬Òò¶ø¾ÍÓÐÁË°ÑÁÙʱ±í½¨³ÉÄÚ´æ±íµÄÏë·¨¡£µ«ÄÚ´æ±íºÍÁÙʱ±íµÄÇø±ðÇÒ²¢²»ÊìϤ£¬ÐèÒª²éÕÒ×ÊÁÏÁË¡£
Ò»¿ªÊ¼ÒÔΪÁÙʱ±íÊÇ´´½¨ºó´æÔÚ£¬µ±Á¬½Ó¶Ï¿ªÊ±ÁÙʱ±í¾Í»á±»É¾³ý£¬¼´ÁÙʱ±íÊÇ´æÔÚÓÚ´ÅÅÌÉϵġ£¶øʵ¼Ê²Ù×÷Öз¢ÏÖÁÙÊ ......
ÒÔmysql-noinstall-5.1.6(win32)ΪÀý
1>°ÑѹËõÎļþmysql-noinstall-5.1.6-alpha-win32.zip½âѹµ½Ò»¸öĿ¼Ï£¬ÔÚ»·¾³±äÁ¿ÖÐÉèÖÃMYSQL_HOME£¬°Ñ%MYSQL_HOME%\bin ¼Ó
Èëµ½ path¡£
2>´´½¨my.iniÅäÖÃÎļþ,ÄÚÈÝÈçÏ£º
[mysqld]
#ÉèÖÃbasedirÖ¸ÏòmysqlµÄ°²×°Â·¾¶
basedir=...\mysql
datadir=...\mysql\data
my.iniÎ ......
from:http://www.ccvita.com/100.html
mysql 5.0´æ´¢¹ý³Ìѧϰ×ܽá
Ò».´´½¨´æ´¢¹ý³Ì
1.»ù±¾Óï·¨£º
create procedure sp_name()
begin
………
end
2.²ÎÊý´«µÝ
¶þ.µ÷Óô洢¹ý³Ì
1.»ù±¾Óï·¨£ºcall sp_name()
×¢Ò⣺´æ´¢¹ý³ÌÃû³ÆºóÃæ±ØÐë¼ÓÀ¨ºÅ£¬ÄÄŸô洢¹ý³ÌûÓвÎÊý´«µÝ
Èý.ɾ³ý´æ´¢¹ý³Ì
1 ......