MySQL×Ö·û´®´¦Àíϵͳ
ÒÔÏÂÊÇÍêÕûµÄÀý×Ó¡£
1¡¢Ð½¨±í
#title: ×Ô¶¨Òå×Ö·û
#auther: Сǿ(Õ¼²·Ê¦)
#date:
2008
-
01
-08
drop
table
if
exists
Category;
create
table
Category
(
cateId
int
(
5
)
not
null
AUTO_INCREMENT,
chiName
varchar
(
80
),
primary
key
(cateId)
);
drop
table
if
exists
OpenRecord;
create
table
OpenRecord
(
opreId
int
(
5
)
not
null
AUTO_INCREMENT,
cateIds
varchar
(
80
),
primary
key
(opreId)
);
2¡¢³õʼ»¯Êý¾Ý
insert
Category(chiName)
values
(
'
fish
'
),(
'
shrimp
'
),(
'
crab
'
),(
'
tiger
'
);
insert
OpenRecord(cateIds)
values
(
'
1,2
'
);
insert
OpenRecord(cateIds)
values
(
'
2,3
Ïà¹ØÎĵµ£º
MySQL×Ö·û´®º¯ÊýµÄÓ¦ÓÃÓë×¢ÒâÊÂÏî
ÒÔϵÄÎÄÕÂÖ÷ÒªÏò´ó¼ÒÃèÊöµÄÊÇMySQL×Ö·û´®º¯ÊýµÄʵ¼ÊÓ¦ÓÃÓëÆäʵ¼Ê²Ù×÷´úÂëµÄÃèÊö£¬Í¬Ê±±¾ÎÄ»¹¶ÔÆäÔÚʵ¼ÊÓ¦ÓÃÖУ¬Ò»Ð©ÖµµÃÎÒÃÇ´ó¼Ò×¢ÒâµÄÏà¹ØÊÂÏîµÄÃèÊö£¬ÒÔϾÍÊÇÎÄÕµÄÖ÷ÒªÄÚÈÝÃèÊö£¬ÍûÄã»áÓÐËùÊÕ»ñ¡£
CHARSET(str) ·µ»Ø×Ö´®×Ö·û¼¯
CONCAT (string2 [,& ......
½â¾ö°ì·¨£ºÔÚÁ¬½Ó×Ö·û´®ÖÐ˵Ã÷Á¬½Ó×Ö·ûµÄÊôÐÔ£¬È磺
<add name="server_mysql" connectionString="server=127.0.0.1;user id=root; password=123; database=baiduemail; pooling=false;charset=gbk"/>
»òÕßÊÇ;charset=gb2312
ÁíÍâ×¢Ò⣺ÔÚ´´½¨mysqlÊý¾Ý¿âµÄ±íµÄʱºòÑ¡Ôñ±àÂ뼯gbk ......
¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......
MysqlÔÚÔËÐÐÒ»¶Îʱ¼äºó£¬Ëæ×Å¿âÈÝÁ¿µÄÔö´ó£¬±íµÄÔö¶à£¬ÓеÄʱºòÒòΪµôµç»òÕßÆäËûÔÒòµ¼ÖÂÊý¾Ý¿âËð»µ,±ÈÈ磺 ¼ì²éÓÅ»¯²¢ÐÞ¸´ËùÓеÄÊý¾Ý¿â£¬ÎÒÃÇ¿ÉÒÔʹÓÃmysql×Ô´øµÄmysqlcheckÃüÁîÀ´¿ìËÙÐÞ¸´ËùÓеÄÊý¾Ý¿â»òÕßÌض¨µÄÊý¾Ý¿â; ½øÈëMysqlµÄBinĿ¼£ºd:\MySQL\MySQL Server 4.1\bin or /usr/bin/
(ls my* ÏÔʾmy¿ªÍ·µÄÎļþ£© ......
Ò»¡¢MySql£¬ÓÃcmdÃüÁîÌáʾÐÐÁ¬½ÓÊý¾Ý¿â£¬·¢ÏÖ²éѯÊý¾Ý¿âÖеÄÖÐÎijöÏÖÂÒÂ룬¶øÊý¾Ý¿âÀïÃæ´æµÄÊÇutf8£¬¶¼ÊÇÕýÈ·µÄ
ÓÚÊÇÉÏÍøËÑË÷һϣ¬
ÕÒµ½Ïà¹ØÉèÖ÷½·¨ÈçÏ¡£
1¡¢MySQLÊÇÓÐһЩ»·¾³±äÁ¿¿ÉÒÔÉèÖã¬
¿ÉÊäÈ룺show variables;¿É²é¿´µ±Ç°µÄ»·¾³±äÁ¿ÉèÖã»
2¡¢ÕâЩ±äÁ¿µ±ÖÐÓÐÒ»²¿·ÖÓë×Ö·ûÏà¹ØµÄÉèÖã¬
¿ÉÊäÈ룺show variabl ......